projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1df9b05
)
typefind: Avoid overflow calculation (image/quicktime)
author
Edward Hervey
<edward@centricular.com>
Fri, 8 Dec 2017 07:00:07 +0000
(08:00 +0100)
committer
Edward Hervey
<bilboed@bilboed.com>
Fri, 8 Dec 2017 08:12:33 +0000
(09:12 +0100)
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.
gst/typefind/gsttypefindfunctions.c
patch
|
blob
|
history
diff --git
a/gst/typefind/gsttypefindfunctions.c
b/gst/typefind/gsttypefindfunctions.c
index
0a66e3a
..
9d8005c
100644
(file)
--- 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;
}