summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2016-11-23 21:27:55 +1100
committerMatthew Waters <matthew@centricular.com>2016-11-23 21:38:00 +1100
commite62da134316082bf053f10c40d63f772536e2b13 (patch)
tree880071bfdcb06a46e665990e0ca45a5f336f4ae9
parentb5b9af41c7aeeeea33aabc26f87e4acba7b3d3b3 (diff)
downloadgstreamer-plugins-base-e62da134316082bf053f10c40d63f772536e2b13.tar.gz
typefind: bounds check windows ico detection
Fixes out of bounds read https://bugzilla.gnome.org/show_bug.cgi?id=774902
-rw-r--r--gst/typefind/gsttypefindfunctions.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c
index 353525ab2..b9519ac0a 100644
--- a/gst/typefind/gsttypefindfunctions.c
+++ b/gst/typefind/gsttypefindfunctions.c
@@ -5163,6 +5163,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;