diff options
author | Edward Hervey <edward@centricular.com> | 2017-12-07 16:09:55 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2017-12-07 16:10:22 +0100 |
commit | 32eae2b166064f134ef0ac6bcda65e5cd41b4efb (patch) | |
tree | f4ea13b476ae444a6e8eff747417dd22090b1229 /gst/typefind | |
parent | b1c135aa72392d872bd60eae6cf636d8616f22eb (diff) | |
download | gstreamer-plugins-base-32eae2b166064f134ef0ac6bcda65e5cd41b4efb.tar.gz |
typefind: Fix previous commit
We need to make sure we have *enough* data to read (including the
next 4 bytes)
Diffstat (limited to 'gst/typefind')
-rw-r--r-- | gst/typefind/gsttypefindfunctions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index cffd8f7cc..0cb7c0dfa 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -3146,7 +3146,7 @@ q3gp_type_find (GstTypeFind * tf, gpointer unused) ftyp_size = GST_READ_UINT32_BE (data); } if ((data = gst_type_find_peek (tf, 0, ftyp_size)) != NULL) { - for (offset = 16; offset < ftyp_size; offset += 4) { + for (offset = 16; offset + 4 < ftyp_size; offset += 4) { if ((profile = q3gp_type_find_get_profile (data + offset))) { gst_type_find_suggest_simple (tf, GST_TYPE_FIND_MAXIMUM, "application/x-3gp", "profile", G_TYPE_STRING, profile, NULL); |