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 746875 - gstelement: Missing argument verification in gst_element_continue_state() and gst_element_change_state()
gstelement: Missing argument verification in gst_element_continue_state() and...
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-27 10:45 UTC by Prashant Gotarne
Modified: 2015-03-29 13:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstelement: Argument Verification in gst_element_continue_state() and gst_element_change_state() (1.43 KB, patch)
2015-03-27 10:45 UTC, Prashant Gotarne
rejected Details | Review

Description Prashant Gotarne 2015-03-27 10:45:08 UTC
Missing argument verification in gst_element_continue_state() and gst_element_change_state() which may cause the segmentation fault in case of NULL argument. Can be handled with the argument check.
Comment 1 Prashant Gotarne 2015-03-27 10:45:51 UTC
Created attachment 300428 [details] [review]
gstelement: Argument Verification in gst_element_continue_state() and gst_element_change_state()

Argument verification done in gst_element_continue_state() and gst_element_change_state() to avoid segmentation fault in case of NULL arguments and to call g_critical() instead so that user can handle it by setting critical handler using g_log_set_handler()
Comment 2 Tim-Philipp Müller 2015-03-29 13:50:04 UTC
Thanks for the patch, but these functions are mostly called internally, I see no need to add these checks just for the sake of it.

Also, I am not sure what you mean by "so that user can handle it by setting critical handler using g_log_set_handler()" - that just doesn't make sense to me.

These checks are sanity checks for programmers to catch problems earlier. Once one such check is triggered chances are things are not going to work afterwards anyway, and on systems where GStreamer has been compiled with -DG_DISABLE_CHECKS (or whatever the define is) it will just crash anyway. Nothing should be handling these things programmatically at runtime really.