avcodec/pnm_parser: clear state if buffer is discarded
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 3 May 2019 21:21:19 +0000 (23:21 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 4 May 2019 18:22:29 +0000 (20:22 +0200)
commit3afdd3e11a2d1239aca7c6350110aee7371d862e
tree8b3b392a1970f46efee5a43b0c0ecef8f30b7f2d
parent98541f70320bc42be277f0fadf74639c190bb827
avcodec/pnm_parser: clear state if buffer is discarded

Fixes: Assertion failure
Fixes: 14484/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5150016408125440

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/pnm_parser.c