avformat/wtvdec: Improve size overflow checks in parse_chunks()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 19 Apr 2021 18:23:41 +0000 (20:23 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 18 Jun 2021 18:53:56 +0000 (20:53 +0200)
commitc1d3a0638afbb73e5f79faf19618691cd70fb0ab
treedaa8031e8c1348a9c807bdc4b583f7648cee7054
parent7f0353bc550f63825f38b68d5451a9721ad053b1
avformat/wtvdec: Improve size overflow checks in parse_chunks()

Fixes: signed integer overflow: 32 + 2147483647 cannot be represented in type 'int
Fixes: 32967/clusterfuzz-testcase-minimized-ffmpeg_dem_WTV_fuzzer-5132856218222592

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f8ec1da8ac8e3daf2403e744f166ea9557b2d333)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/wtvdec.c