GNOME Bugzilla – Bug 746875
gstelement: Missing argument verification in gst_element_continue_state() and gst_element_change_state()
Last modified: 2015-03-29 13:53:35 UTC
Missing argument verification in gst_element_continue_state() and gst_element_change_state() which may cause the segmentation fault in case of NULL argument. Can be handled with the argument check.
Created attachment 300428 [details] [review] gstelement: Argument Verification in gst_element_continue_state() and gst_element_change_state() Argument verification done in gst_element_continue_state() and gst_element_change_state() to avoid segmentation fault in case of NULL arguments and to call g_critical() instead so that user can handle it by setting critical handler using g_log_set_handler()
Thanks for the patch, but these functions are mostly called internally, I see no need to add these checks just for the sake of it. Also, I am not sure what you mean by "so that user can handle it by setting critical handler using g_log_set_handler()" - that just doesn't make sense to me. These checks are sanity checks for programmers to catch problems earlier. Once one such check is triggered chances are things are not going to work afterwards anyway, and on systems where GStreamer has been compiled with -DG_DISABLE_CHECKS (or whatever the define is) it will just crash anyway. Nothing should be handling these things programmatically at runtime really.