diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-04-23 19:39:16 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-07-31 22:08:19 +0200 |
commit | 5e38eff284637e9f7c3c25d020df549ca6667e40 (patch) | |
tree | 10ff31da72213de59137181522bada21a06c992b | |
parent | b4e77dfca1c2970446f79277034d8e60c3fe3f4e (diff) | |
download | ffmpeg-5e38eff284637e9f7c3c25d020df549ca6667e40.tar.gz |
avformat/dsfdec: Change order of operations in bitrate computation
Fixes: signed integer overflow: 538976288 * 67372036 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_DSF_fuzzer-6751696819716096
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/dsfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dsfdec.c b/libavformat/dsfdec.c index 02ee4c1231..c872f98cc2 100644 --- a/libavformat/dsfdec.c +++ b/libavformat/dsfdec.c @@ -130,7 +130,7 @@ static int dsf_read_header(AVFormatContext *s) return AVERROR_INVALIDDATA; } st->codecpar->block_align *= st->codecpar->channels; - st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate * 8LL; + st->codecpar->bit_rate = st->codecpar->channels * 8LL * st->codecpar->sample_rate; avpriv_set_pts_info(st, 64, 1, st->codecpar->sample_rate); avio_skip(pb, 4); |