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.
This commit is contained in:
Edward Hervey 2017-12-08 08:00:07 +01:00 committed by Edward Hervey
parent 1df9b05f18
commit aa10e82257

View file

@ -3460,6 +3460,8 @@ qtif_type_find (GstTypeFind * tf, gpointer unused)
}
offset += size;
if (offset + 8 >= G_MAXINT64)
break;
if (++rounds > QTIF_MAXROUNDS)
break;
}