mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/pp_bnk: Use 64bit in bitrate computation
Fixes: signed integer overflow: 1207959552 * 4 cannot be represented in type 'int'
Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_PP_BNK_fuzzer-6747301169201152
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 88fc295838
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
acfce11c48
commit
b425df191c
|
@ -223,7 +223,7 @@ static int pp_bnk_read_header(AVFormatContext *s)
|
|||
par->bits_per_coded_sample = 4;
|
||||
par->bits_per_raw_sample = 16;
|
||||
par->block_align = 1;
|
||||
par->bit_rate = par->sample_rate * par->bits_per_coded_sample * par->channels;
|
||||
par->bit_rate = par->sample_rate * (int64_t)par->bits_per_coded_sample * par->channels;
|
||||
|
||||
avpriv_set_pts_info(st, 64, 1, par->sample_rate);
|
||||
st->start_time = 0;
|
||||
|
|
Loading…
Reference in New Issue