[Bug 746439] task: guard against NULL task function in gst_task_new()

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jun 25 01:59:54 PDT 2015


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |t.i.m at zen.co.uk
         Resolution|---                         |FIXED
   Target Milestone|git master                  |1.5.2
            Summary|gsttask: function           |task: guard against NULL
                   |gst_task_new - Segmentation |task function in
                   |fault for GstTask object    |gst_task_new()
                   |created with NULL value for |
                   |GstTaskFunction argument    |
           Severity|normal                      |minor

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Thanks, I have pushed this now, but just in general: there is no requirement
for every function to have function guards. These are optional and they only
aid programmers to avoid and spot basic mistakes. All these
g_return_{val}_if_*() are usually compiled out on embedded systems.

It is never valid to pass a NULL function to gst_task_new(), and it is ok and
epxected that GStreamer crashes when that happens. It's C. g_return_*() doesn't
offer any protection really, since it is often compiled out.

 commit 03dccde1ef977ed7d57b445ab4efbd10a23e60f0
 Author: Prashant Gotarne <ps.gotarne at samsung.com>
 Date:   Thu Mar 19 15:55:14 2015 +0530

    task: guard against NULL task function

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

-- 
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