avformat/mpc8: fix hang with fuzzed file
authorwm4 <nfxjfg@googlemail.com>
Tue, 3 Feb 2015 18:04:12 +0000 (19:04 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 17 Feb 2015 18:43:18 +0000 (19:43 +0100)
commit3d8c51d699165b63f54af309686e27d311a16a59
tree59af5ed30ba9ee4a997f93dff844802bb8473594
parentc7dc73a6c3339c525d62498964a707936ff838fc
avformat/mpc8: fix hang with fuzzed file

This can lead to an endless loop by seeking back a few bytes after each
attempted chunk read. Assuming negative sizes are always invalid, this
is easy to fix. Other code in this demuxer treats negative sizes as
invalid as well.

Fixes ticket #4262.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 56cc024220886927350cfc26ee695062ca7ecaf4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpc8.c