GNOME Bugzilla – Bug 746871
bus: Segmentation fault in function gst_bus_set_flushing() when called with bus==NULL
Last modified: 2015-03-27 10:39:39 UTC
Segmentation fault occured in function gst_bus_set_flushing() with NULL argument.
commit 2064a07feb8d7d1c0477a76c41dd12b4d49b7aff Author: Sebastian Dröge <sebastian@centricular.com> Date: Fri Mar 27 10:15:16 2015 +0100 bus: Add guards against invalid arguments to set_flushing() and poll() https://bugzilla.gnome.org/show_bug.cgi?id=746871
It's not safe to do that and will still result in a g_critical(). You should never call any object methods with NULL as the object instance.
Created attachment 300422 [details] [review] gstbus: Argument Verification in gst_bus_set_flushing() Argument verification needed in function gst_bus_set_flushing() to avoid possible segmentation fault in case of NULL argument.
Comment on attachment 300422 [details] [review] gstbus: Argument Verification in gst_bus_set_flushing() Committed that fix (plus the same for poll()) some minutes ago already.
Just to be clear, those checks are merely there to assist programmers in finding typical issues faster. There's no need to check every argument in every function. It is never valid to call these functions with those arguments, and these checks will be compiled out on embedded systems anyway.