diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-09-25 16:48:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-31 19:51:55 +0100 |
commit | 6e6f0027fd9e87b4110334d90fce9a3b10cdc3d9 (patch) | |
tree | d87f2038041b9a0b42b8bbd343567c1488a35f3c | |
parent | 1493a952ed236c7339566a8cdd42d314fe3184e7 (diff) | |
download | ffmpeg-6e6f0027fd9e87b4110334d90fce9a3b10cdc3d9.tar.gz |
avcodec/dstdec: Fix integer overflow in samples_per_frame computation
Fixes: Timeout (? -> 2ms)
Fixes: 17616/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5198057947267072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7dc0943d4aa014e616e2f2a4802cb3da829f9420)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/dstdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c index 0614c99c4b..8a1bc6a738 100644 --- a/libavcodec/dstdec.c +++ b/libavcodec/dstdec.c @@ -37,7 +37,7 @@ #define DST_MAX_CHANNELS 6 #define DST_MAX_ELEMENTS (2 * DST_MAX_CHANNELS) -#define DSD_FS44(sample_rate) (sample_rate * 8 / 44100) +#define DSD_FS44(sample_rate) (sample_rate * 8LL / 44100) #define DST_SAMPLES_PER_FRAME(sample_rate) (588 * DSD_FS44(sample_rate)) |