typefindfunctions: prevent unsigned int overflow
authorHeekyoung Seo <heekyoung.seo@lge.com>
Fri, 10 Feb 2017 08:32:29 +0000 (17:32 +0900)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 14 Feb 2017 10:22:37 +0000 (12:22 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=778432

gst/typefind/gsttypefindfunctions.c

index ca8b83b..90544b3 100644 (file)
@@ -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--;