diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-03-12 03:04:05 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-20 03:41:33 +0200 |
commit | 36c314e76a53623bfaf802841dc0fb1b6c054c3c (patch) | |
tree | 57fda33322248a34321dc168f6e6fdd6af900ddf | |
parent | 4e2c1055a0a227ab6ddabbe2e15e18c4bb4f5a45 (diff) | |
download | ffmpeg-36c314e76a53623bfaf802841dc0fb1b6c054c3c.tar.gz |
avcodec/rv34: Fix runtime error: signed integer overflow: 36880 * 66288 cannot be represented in type 'int'
Fixes: 768/clusterfuzz-testcase-4807444305805312
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a66c6e28b543804f50df1c6083a204219b6b1daa)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/rv34.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index 48bf9ad423..bcdbf88796 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1630,7 +1630,7 @@ static AVRational update_sar(int old_w, int old_h, AVRational sar, int new_w, in if (!sar.num) sar = (AVRational){1, 1}; - sar = av_mul_q(sar, (AVRational){new_h * old_w, new_w * old_h}); + sar = av_mul_q(sar, av_mul_q((AVRational){new_h, new_w}, (AVRational){old_w, old_h})); return sar; } |