[Bug 788133] New: Fix problems with GstVideoInfo
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Sep 25 13:28:38 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=788133
Bug ID: 788133
Summary: Fix problems with GstVideoInfo
Classification: Platform
Product: GStreamer
Version: git master
OS: Windows
Status: NEW
Severity: major
Priority: Normal
Component: gst-sharp
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: erlend at pexip.com
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created attachment 360355
--> https://bugzilla.gnome.org/attachment.cgi?id=360355&action=edit
patch
The ABI union member was missing from the C# representation of
GstVideoInfo, which means the size of the C# struct was 32 bytes
smaller than the actual struct. This caused heap corruption when
e.g. calling VideoInfo.Init(), since the binding uses AllocHGlobal to
allocate temporary storage for the GstVideoInfo struct (but only
allocates a number of bytes equal to the size of the C# struct), and
then passes a pointer to the allocated memory to gst_video_info_*()
functions. When gst_video_info_init() is called, it does a memset with
sizeof(GstVideoInfo), which results in an out-of-bounds write.
With this change, padding bytes equal to the size of the ABI union are
added to the generated C# struct.
Also suppressed the auto-generated .Equals() method, and instead
implemented it to call IsEqual() (gst_video_info_is_equal).
--
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