wavparse: Actually clip to upstream size instead of size of the data chunk
authorSebastian Dröge <sebastian@centricular.com>
Tue, 13 Jun 2017 21:09:25 +0000 (00:09 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 13 Jun 2017 21:11:17 +0000 (00:11 +0300)
commita82e38d6074305cd85268476cdc50b7cdedbe9c9
tree359387748fd45a7eca25a7a028d3214017c268db
parent96cd9417886cc34f7a7f6fa299c9d4a6ec962851
wavparse: Actually clip to upstream size instead of size of the data chunk

There might be other chunks after the data chunk, so clipping the chunk
size with the data size can lead to a negative number and all following
calculations go wrong and cause crashes or worse.

This was introduced in 3ac119bbe2c360e28c087cf3852ea769d611b120.

https://bugzilla.gnome.org/show_bug.cgi?id=783760
gst/wavparse/gstwavparse.c