avcodec/pnm_parser: Avoid reparsing failed data.
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 28 Jul 2018 12:09:32 +0000 (14:09 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 4 Aug 2018 14:17:01 +0000 (16:17 +0200)
commit1940c27c8272843f5139a25758fb92b1b1858cbe
treebd23878aa6d9f6aa7b8e191fe828a01c0e5c9637
parent83dab8183e9f8f6bf8ef492ee372faa43196f8a8
avcodec/pnm_parser: Avoid reparsing failed data.

Alternatively the parser could be re implemented / redesigned so as to better
and more efficiently find frame boundaries

Fixes: Timeout
Fixes: 9210/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PBM_fuzzer-4770771833454592
Fixes: 9214/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PPM_fuzzer-5741633353023488
Fixes: 9219/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGM_fuzzer-6249230237696000
Fixes: 9550/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5312669836902400

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