[FFmpeg-cvslog] avcodec/pnm_parser: clear state if buffer is discarded
Michael Niedermayer
git at videolan.org
Sun May 5 00:22:51 EEST 2019
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri May 3 23:21:19 2019 +0200| [3afdd3e11a2d1239aca7c6350110aee7371d862e] | committer: Michael Niedermayer
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 at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3afdd3e11a2d1239aca7c6350110aee7371d862e
---
libavcodec/pnm_parser.c | 1 +
1 file changed, 1 insertion(+)
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);
More information about the ffmpeg-cvslog
mailing list