summaryrefslogtreecommitdiff
path: root/gst/typefind
diff options
context:
space:
mode:
authorHeekyoung Seo <heekyoung.seo@lge.com>2017-02-10 17:32:29 +0900
committerSebastian Dröge <sebastian@centricular.com>2017-02-14 12:22:37 +0200
commit0889d89407faa4462ea70dcfe1866da1b863f31a (patch)
tree7bb53c50bfb6682653d9d0701b21c407c5253cc7 /gst/typefind
parent66148a770c3561a6b5c16b06b5b885b4b687cd71 (diff)
downloadgstreamer-plugins-base-0889d89407faa4462ea70dcfe1866da1b863f31a.tar.gz
typefindfunctions: prevent unsigned int overflow
https://bugzilla.gnome.org/show_bug.cgi?id=778432
Diffstat (limited to 'gst/typefind')
-rw-r--r--gst/typefind/gsttypefindfunctions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c
index ca8b83b73..90544b353 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--;