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 757949 - gst_rtsp_server_io_func() pops a context that has not been pushed
gst_rtsp_server_io_func() pops a context that has not been pushed
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2015-11-11 14:14 UTC by Marcus Prebble
Modified: 2015-11-11 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---

Suggested correction (1.18 KB, patch)
2015-11-11 14:14 UTC, Marcus Prebble
none Details | Review
Suggested correction (1.33 KB, patch)
2015-11-11 14:45 UTC, Marcus Prebble
committed Details | Review

Description Marcus Prebble 2015-11-11 14:14:12 UTC
Created attachment 315267 [details] [review]
Suggested correction

The macro GST_RTSP_CHECK() is called before any context is pushed, and this calls gst_rtsp_connection_accept() which can sometimes fail e.g. in the case of an nmap port scan. 

In our implementation this ends up logging a critical in the system log when gst_rtsp_context_pop_current() tried to pop a non-existent context.
Comment 1 Sebastian Dröge (slomo) 2015-11-11 14:21:20 UTC
Review of attachment 315267 [details] [review]:

Thanks for reporting, the patch is also correct but not 100% complete :) In case the "if (condition & G_IO_IN)" fails, it will also never push a context
Comment 2 Marcus Prebble 2015-11-11 14:45:47 UTC
Created attachment 315270 [details] [review]
Suggested correction

Handle the case of when the event is not GIO
Comment 3 Sebastian Dröge (slomo) 2015-11-11 14:59:19 UTC
commit b90d4ba917dc3a1ad4a080b229a55931bc8e828d
Author: Marcus Prebble <>
Date:   Wed Nov 11 14:58:33 2015 +0100

    rtsp-server: Change the logic so we don't pop a NULL context
    When doing a port scan (e.g. with nmap) the call to GST_RTSP_CHECK()
    will sometimes fail. This call is made before any context is pushed
    resulting in an attempt to pop a NULL context.