diff options
author | Edward Hervey <edward@centricular.com> | 2017-12-08 08:00:07 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2018-01-17 15:56:20 +0200 |
commit | 3b70435383313046646780c981ce2e6cb5a438e7 (patch) | |
tree | a7beb85fa5694218fbd70288ce17f107d81e59df | |
parent | 68b91556f749ea82cb6cb4a1a6f53dca5d85b000 (diff) | |
download | gstreamer-plugins-base-3b70435383313046646780c981ce2e6cb5a438e7.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.
-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 44a146acb..e5259de35 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -3364,6 +3364,8 @@ qtif_type_find (GstTypeFind * tf, gpointer unused) } offset += size; + if (offset + 8 >= G_MAXINT64) + break; if (++rounds > QTIF_MAXROUNDS) break; } |