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 794696 - funnel: Allow request_new_pad with null PadTemplate
funnel: Allow request_new_pad with null PadTemplate
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Windows
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-26 13:23 UTC by Seungha Yang
Modified: 2018-11-03 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
funnel: Allow request_new_pad with null PadTemplate (1.34 KB, patch)
2018-03-26 13:24 UTC, Seungha Yang
reviewed Details | Review

Description Seungha Yang 2018-03-26 13:23:49 UTC
To fix null pointer access in case of calling request_new_pad()
virtual function directly with null PadTemplate.
funnel has only one sinkpad template and we do not need to refer to
incoming PadTemplate.
Comment 1 Seungha Yang 2018-03-26 13:24:38 UTC
Created attachment 370148 [details] [review]
funnel: Allow request_new_pad with null PadTemplate
Comment 2 Sebastian Dröge (slomo) 2018-03-26 14:01:36 UTC
Comment on attachment 370148 [details] [review]
funnel: Allow request_new_pad with null PadTemplate

How would you end up with a NULL pad template here? gst_element_request_pad() requires a template to be given and gst_element_get_request_pad() gets the corresponding template before calling the vfunc.

Calling the vfunc with a NULL template is not supposed to work.
Comment 3 Seungha Yang 2018-03-26 14:16:02 UTC
(In reply to Sebastian Dröge (slomo) from comment #2)
> Calling the vfunc with a NULL template is not supposed to work.
If so, this patch may not be required.

Now I'm digging a bug #794654 and to fix the bug (just trial), I tried to replace streamcombiner with funnel and found null pointer dereferencing.

Here is the point of calling request_pad() vfunction directly without gst_element_request_pad()
https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst/encoding/gstencodebin.c#n1385

and

https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst/encoding/gstencodebin.c#n1002
Comment 4 GStreamer system administrator 2018-11-03 12:45:27 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/282.