OSDN Git Service

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, 3 Feb 2015 23:39:56 +0000 (00:39 +0100)
commit56cc024220886927350cfc26ee695062ca7ecaf4
tree2d89fb4c706d325270494f648d0d29584edcd52a
parente93d3a22cb53bd88f551c1ad05cf3db3d453a396
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>
libavformat/mpc8.c