GNOME Bugzilla – Bug 757949
gst_rtsp_server_io_func() pops a context that has not been pushed
Last modified: 2015-11-11 14:59:55 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.
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
Created attachment 315270 [details] [review] Suggested correction Handle the case of when the event is not GIO
commit b90d4ba917dc3a1ad4a080b229a55931bc8e828d Author: Marcus Prebble <prebble@axis.com> 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. https://bugzilla.gnome.org/show_bug.cgi?id=757949