From: Olivier CrĂȘte Date: Tue, 3 Jan 2023 20:01:37 +0000 (-0500) Subject: srt: Avoid crash on unknown option X-Git-Tag: 1.22.0~92 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f45cfe0d53fb06deb0e61f19325bbf7123dcbc02;p=platform%2Fupstream%2Fgstreamer.git srt: Avoid crash on unknown option Use the correct field that is null instead of the struct value which never is. Part-of: --- diff --git a/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c b/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c index e49e655..d16e2b9 100644 --- a/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c +++ b/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c @@ -795,7 +795,7 @@ gst_srt_object_set_socket_option (GstStructure * s, const gchar * key, { SrtOption *option = srt_options; - for (; option; ++option) { + for (; option->name; ++option) { if (g_str_equal (key, option->name)) { switch (option->gtype) { case G_TYPE_INT: