From 0889d89407faa4462ea70dcfe1866da1b863f31a Mon Sep 17 00:00:00 2001 From: Heekyoung Seo Date: Fri, 10 Feb 2017 17:32:29 +0900 Subject: [PATCH] typefindfunctions: prevent unsigned int overflow https://bugzilla.gnome.org/show_bug.cgi?id=778432 --- gst/typefind/gsttypefindfunctions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index ca8b83b..90544b3 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -1506,7 +1506,7 @@ mp3_type_find_at_offset (GstTypeFind * tf, guint64 start_off, offset += length; } g_assert (found <= GST_MP3_TYPEFIND_TRY_HEADERS); - if (head_data == NULL && + if (found != 0 && head_data == NULL && gst_type_find_peek (tf, offset + start_off - 1, 1) == NULL) /* Incomplete last frame - don't count it. */ found--; -- 2.7.4