Commit Graph

7 Commits

Author SHA1 Message Date
wm4
09b4ad1568 vp9: avoid infinite loop with broken files
With a certain fuzzed file, the parser will always return 0 consumed
bytes, which makes calling code call the parser infinitely. Return the
full packet size on error instead. (Here it would be nice if parsers
could return errors at all.)

Additionally, _if_ there's some data left, return that too, which might
help with somewhat broken but still somehow playable files.

Fixes ticket #4242.

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-10 20:12:36 +01:00
wm4
b88e80589b vp9: fix parser return values in error case
The parser must always set the out_size and out_data pointers. The API
seems to require it, and the common code in parser.c also relies on it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-09 12:34:05 +01:00
Ronald S. Bultje
c72f587353 vp9/parser: change size type to unsigned.
Fixes valgrind errors in fuzzed8.ivf because size >= 0x80000000.
2014-02-08 12:53:59 +01:00
Ronald S. Bultje
0065d2d520 vp9: fix mt-related hang a parser infinite loop.
Fixes trac ticket 3274.

Looked-at-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-11 22:35:14 +01:00
Ronald S. Bultje
847072873c vp9_parse: don't use AVCodecParserContext as av_log context.
Fixes trac ticket 3273.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-05 21:45:24 +01:00
Ronald S. Bultje
9695fb2622 vp9_parser: handle zero-sized packets.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-12-03 14:06:34 +01:00
Ronald S. Bultje
84d362f020 vp9: split packet parsing into an AVParser. 2013-11-30 16:26:12 -05:00