typefind: wavpack: limit search in blocksize

The maximum blocksize is 131072 bytes, anything bigger is a corrupted
file.
This commit is contained in:
Edward Hervey 2017-12-07 14:52:36 +01:00 committed by Edward Hervey
parent a3bf3094d1
commit 0428b4afda

View file

@ -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;