typefindfunctions: prevent unsigned int overflow

https://bugzilla.gnome.org/show_bug.cgi?id=778432
This commit is contained in:
Heekyoung Seo 2017-02-10 17:32:29 +09:00 committed by Sebastian Dröge
parent 66148a770c
commit 0889d89407

View 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--;