From 88acbd60cdea7a6220aae7eff50651b7e6ec78dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 24 Apr 2013 00:08:15 +0100 Subject: [PATCH] typefindfunctions: fix crash in new MSS typefinder Fixes icydemux test_first_buf_offset_when_merged_for_typefinding unit test segfaulting on a NULL pointer. --- gst/typefind/gsttypefindfunctions.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index b3134d537a..5fe01010cc 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -3279,6 +3279,9 @@ mss_manifest_type_find (GstTypeFind * tf, gpointer unused) /* try detecting the charset */ data = gst_type_find_peek (tf, 0, 2); + if (data == NULL) + return; + /* look for a possible BOM */ utf16_le = data[0] == 0xFF && data[1] == 0xFE; utf16_be = data[0] == 0xFE && data[1] == 0xFF;