avcodec/pnm: Avoid structure pointer dereferences in inner loop in pnm_get()
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 21 Feb 2019 17:38:40 +0000 (18:38 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 23 Feb 2019 21:48:35 +0000 (22:48 +0100)
commit3f68948cb3036e239baa17d88b2f2ef1ecbb8f0c
tree125a1d0de05a089aaa3c38e57f8836b9bd9827c1
parent177b40890c6de8c6896e0a1d4a631ea1ca89c044
avcodec/pnm: Avoid structure pointer dereferences in inner loop in pnm_get()

Improves speed from 5.4 to 4.2 seconds
Fixes: 13149/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGM_fuzzer-5760833622114304
Fixes: 13166/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5763216322330624

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