From 71f367c297ccfeebf7ff54439d9e69e601efd949 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 23 Nov 2016 21:27:55 +1100 Subject: typefind: bounds check windows ico detection Fixes out of bounds read https://bugzilla.gnome.org/show_bug.cgi?id=774902 --- gst/typefind/gsttypefindfunctions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 63e1de983..40fe3d44f 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -5128,6 +5128,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; -- cgit v1.2.1