[Bug 774588] video-info: Catch overflows in the video frame size calculation

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Nov 24 12:23:40 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=774588

Tim-Philipp Müller <t.i.m at zen.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #340632|none                        |reviewed
             status|                            |

--- Comment #12 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 340632
  --> https://bugzilla.gnome.org/attachment.cgi?id=340632
video-info: Sanity check the frame size to prevent overflows

> /**
>  * gst_video_info_init:
>@@ -205,13 +205,15 @@ validate_colorimetry (GstVideoInfo * info)
>  * Note: This initializes @info first, no values are preserved. This function
>  * does not set the offsets correctly for interlaced vertically
>  * subsampled formats.
>+ *
>+ * Returns: %FALSE if the returned video info is invalid
>  */

Would be good to mention that it only has a return value since 1.12, and also
make it more explicit why FALSE might be returned here.

>@@ -1100,8 +1115,10 @@ done:
>  *
>  * Extra padding will be added to the right side when stride alignment padding
>  * is required and @align will be updated with the new padding values.
>+ *
>+ * Returns: %FALSE if alignment could not be applie
>  */

typo - applied :)

Looks good in general. I'm sure there are still more corner cases, but this
should be a good start.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list