diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-05-04 00:21:19 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-05-04 21:22:29 +0300 |
commit | 3afdd3e11a2d1239aca7c6350110aee7371d862e (patch) | |
tree | 8b3b392a1970f46efee5a43b0c0ecef8f30b7f2d /libavcodec/pnm_parser.c | |
parent | 98541f70320bc42be277f0fadf74639c190bb827 (diff) |
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>
Diffstat (limited to 'libavcodec/pnm_parser.c')
-rw-r--r-- | libavcodec/pnm_parser.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pnm_parser.c b/libavcodec/pnm_parser.c index de0e32ba9c..5339bebde9 100644 --- a/libavcodec/pnm_parser.c +++ b/libavcodec/pnm_parser.c @@ -69,6 +69,7 @@ retry: if (pnmctx.bytestream < pnmctx.bytestream_end) { if (pc->index) { pc->index = 0; + pnmpc->ascii_scan = 0; } else { unsigned step = FFMAX(1, pnmctx.bytestream - pnmctx.bytestream_start); |