typefind: bounds check windows ico detection
authorMatthew Waters <matthew@centricular.com>
Wed, 23 Nov 2016 10:27:55 +0000 (21:27 +1100)
committerMatthew Waters <matthew@centricular.com>
Wed, 23 Nov 2016 10:37:27 +0000 (21:37 +1100)
Fixes out of bounds read

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

gst/typefind/gsttypefindfunctions.c

index 7cac6bd..d790445 100644 (file)
@@ -5224,6 +5224,8 @@ windows_icon_typefind (GstTypeFind * find, gpointer user_data)
   gint32 size, offset;
 
   datalen = gst_type_find_get_length (find);
+  if (datalen < 18)
+    return;
   if ((data = gst_type_find_peek (find, 0, 6)) == NULL)
     return;