avcodec/targa: Check input size for uncompressed TGA before allocation
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 23 Dec 2021 19:17:14 +0000 (20:17 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 30 Dec 2021 21:20:14 +0000 (22:20 +0100)
commit68f8292aa96d99b733ca7d2e56b584b00263db84
tree8066f99476672ad040e4eb11d13f3d0d143da1be
parentafdbc940c6011b64c1856f88d2b0609369f87406
avcodec/targa: Check input size for uncompressed TGA before allocation

Fixes: Timeout
Fixes: 42667/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-5619236075077632

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