asfdemux: Reset number of languages to 0 when freeing the array because of errors 07/158707/1 accepted/tizen_3.0_common accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable tizen_3.0 accepted/tizen/3.0/common/20171108.094423 accepted/tizen/3.0/mobile/20171107.215451 accepted/tizen/3.0/tv/20171107.215507 accepted/tizen/3.0/wearable/20171107.215524 submit/tizen_3.0/20171103.024204
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 2 Nov 2017 12:26:13 +0000 (21:26 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 2 Nov 2017 12:26:52 +0000 (21:26 +0900)
Otherwise we will happily index into the array at NULL if the requested
index is smaller than the number of languages that were previously
allocated.

https://bugzilla.gnome.org/show_bug.cgi?id=777937

Change-Id: If6257d541c5a1e55241a53d33896a719fb99713a

gst/asfdemux/gstasfdemux.c

index 2db00d21343db534165b60776e174abba0ed3dd3..f37419df7a3e75ebd00491bf9f689c641f3d3896 100644 (file)
@@ -3729,6 +3729,7 @@ not_enough_data:
     GST_WARNING_OBJECT (demux, "short read parsing language list object!");
     g_free (demux->languages);
     demux->languages = NULL;
+    demux->num_languages = 0;
     return GST_FLOW_OK;         /* not fatal */
   }
 }