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:
a3bf309
)
typefind: wavpack: limit search in blocksize
author
Edward Hervey
<edward@centricular.com>
Thu, 7 Dec 2017 13:52:36 +0000
(14:52 +0100)
committer
Edward Hervey
<bilboed@bilboed.com>
Thu, 7 Dec 2017 14:05:07 +0000
(15:05 +0100)
The maximum blocksize is 131072 bytes, anything bigger is a corrupted
file.
gst/typefind/gsttypefindfunctions.c
patch
|
blob
|
history
diff --git
a/gst/typefind/gsttypefindfunctions.c
b/gst/typefind/gsttypefindfunctions.c
index
f905dda
..
d37d4a4
100644
(file)
--- a/
gst/typefind/gsttypefindfunctions.c
+++ b/
gst/typefind/gsttypefindfunctions.c
@@
-1966,6
+1966,9
@@
wavpack_type_find (GstTypeFind * tf, gpointer unused)
* work in pull-mode */
blocksize = GST_READ_UINT32_LE (data + 4);
GST_LOG ("wavpack header, blocksize=0x%04x", blocksize);
+ /* If bigger than maximum allowed blocksize, refuse */
+ if (blocksize > 131072)
+ return;
count_wv = 0;
count_wvc = 0;
offset = 32;