diff options
author | Edward Hervey <edward@centricular.com> | 2017-12-08 08:00:07 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2017-12-08 09:12:33 +0100 |
commit | aa10e82257c4646b18febb0d9dabbc6941f42c08 (patch) | |
tree | dee757e72d5a85e4694b9c8d67de6159bee736c4 /gst/typefind | |
parent | 1df9b05f18af492e4de5abfb6a842287712fb732 (diff) | |
download | gstreamer-plugins-base-aa10e82257c4646b18febb0d9dabbc6941f42c08.tar.gz |
typefind: Avoid overflow calculation (image/quicktime)
The qt typefinder uses guint64 values for offset and size calculation
but the typefinder system only supports gint64 values.
Make sure we don't end up using potentially overflowing values.
Diffstat (limited to 'gst/typefind')
-rw-r--r-- | gst/typefind/gsttypefindfunctions.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 0a66e3a33..9d8005c14 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -3460,6 +3460,8 @@ qtif_type_find (GstTypeFind * tf, gpointer unused) } offset += size; + if (offset + 8 >= G_MAXINT64) + break; if (++rounds > QTIF_MAXROUNDS) break; } |