ad_ffmpeg: add sanity check against decoder overreads
commitb9b8aaf8a271ee20c90908ac47573f5ef0285782
authorUoti Urpala <uau@mplayer2.org>
Mon, 6 Aug 2012 18:22:37 +0000 (6 21:22 +0300)
committerUoti Urpala <uau@mplayer2.org>
Mon, 6 Aug 2012 20:39:48 +0000 (6 23:39 +0300)
tree7c231d94e0fdb2c51e3f5f094e3f6278265aac70
parent3259e4a7a2a9386fed1d4c0ddb8a3ee33534ff37
ad_ffmpeg: add sanity check against decoder overreads

The libavcodec Musepack SV8 decoder returned 2 bytes consumed for 1
byte input, which triggered a crash due to negative input packet size
later. Add a sanity check to prevent crashes with this type of minor
decoder overreads. Also add a check to parser consumed data.
libmpcodecs/ad_ffmpeg.c