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 733757 - GstURIHandlers which return NULL GErrors cause GStreamer to crash
GstURIHandlers which return NULL GErrors cause GStreamer to crash
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-25 18:43 UTC by Carlos Rafael Giani
Modified: 2018-11-03 12:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsturi.c patch (1013 bytes, patch)
2014-07-25 18:43 UTC, Carlos Rafael Giani
needs-work Details | Review

Description Carlos Rafael Giani 2014-07-25 18:43:13 UTC
Created attachment 281720 [details] [review]
gsturi.c patch

If a GstURIHandler's set_uri() function sets the *error parameter to NULL, the code in gsturi.c will attempt a NULL pointer dereference if debug logging is enabled, thus causing a crash.

Fixed by checking for a NULL pointer and printing an alternate text in this case.
Comment 1 Sebastian Dröge (slomo) 2014-07-28 07:09:42 UTC
Review of attachment 281720 [details] [review]:

::: gst/gsturi.c
@@ +608,2 @@
       GST_WARNING ("%s didn't accept URI '%s': %s", GST_OBJECT_NAME (ret), uri,
+          (uri_err != NULL) ? uri_err->message : "<GError variable NULL>");

If err is NULL this is a programming error in the element. Can you make that a g_warning() or g_critical()?

Also we should fix the elements :)
Comment 2 Sebastian Dröge (slomo) 2014-07-28 07:35:41 UTC
Note that I just mean that there additionally should be a g_critical() :) It should still not crash
Comment 3 Carlos Rafael Giani 2014-07-28 10:01:02 UTC
Okay. Note though that the documentation doesn't say anything about uri_err NULL being a programming error. What if there just is a general error and no details are available?
Comment 4 Sebastian Dröge (slomo) 2018-03-22 07:55:39 UTC
If a non-NULL GError** is passed to a function and the function fails, the error *must* be set.

Can you update the patch accordingly to also do a g_critical() if that happens?
Comment 5 GStreamer system administrator 2018-11-03 12:21:45 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/68.