After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746385 - task: add function guards for gst_task_set_lock()
task: add function guards for gst_task_set_lock()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-18 10:13 UTC by Prashant Gotarne
Modified: 2015-08-16 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst_task_set_lock function validates argument GstTask* (1007 bytes, patch)
2015-03-18 10:31 UTC, Prashant Gotarne
none Details | Review

Description Prashant Gotarne 2015-03-18 10:13:18 UTC
Function gst_task_set_lock have to check for the valid arguments. 
NULL value for the argument cause the segmentation fault.
Comment 1 Prashant Gotarne 2015-03-18 10:31:37 UTC
Created attachment 299696 [details] [review]
gst_task_set_lock function validates argument GstTask*

Please review the patch attached for the issue
Comment 2 Tim-Philipp Müller 2015-07-13 13:20:34 UTC
We don't "have" to check, these checks are only there to aid developers during their plugin/application development cycle to catch problems early. Developers can't rely on those checks being there, and on most embedded systems they will not be present.

commit 3cea60dc6f2d7f8641107348c4a6576308e601cc
Author: Prashant Gotarne <ps.gotarne@samsung.com>
Date:   Wed Mar 18 16:05:34 2015 +0530

    task: add function guard for _set_lock() and fix guard for _join()
    
    Should only access the object structure after checking
    it's valid in gst_task_join().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746385
    https://bugzilla.gnome.org/show_bug.cgi?id=746431