• wm4's avatar
    vp9: avoid infinite loop with broken files · 09b4ad15
    wm4 authored
    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: 's avatar"Ronald S. Bultje" <rsbultje@gmail.com>
    Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
    09b4ad15
vp9_parser.c 3.62 KB