avutil/mathematics: Fix 2 overflows in av_add_stable()
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 10 Aug 2019 19:09:03 +0000 (21:09 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 31 Aug 2019 16:34:05 +0000 (18:34 +0200)
commit679f3408906081036afacbc94f325793f303c039
treedbb7ddc91197a37a24f5ec338738b657228828f7
parentce1fcc8cede2971f6e36119e9dd41fb41b36c63a
avutil/mathematics: Fix 2 overflows in av_add_stable()

Fixes: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long'
Fixes: 16022/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5759796759756800

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