mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avformat/qcp: Avoid negative nb_rates
Fixes: signed integer overflow: 2 * -1725947872 cannot be represented in type 'int' Fixes: 29102/clusterfuzz-testcase-minimized-ffmpeg_dem_QCP_fuzzer-6726807632084992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
88fc295838
commit
1b865cc703
@ -93,7 +93,8 @@ static int qcp_read_header(AVFormatContext *s)
|
||||
QCPContext *c = s->priv_data;
|
||||
AVStream *st = avformat_new_stream(s, NULL);
|
||||
uint8_t buf[16];
|
||||
int i, nb_rates;
|
||||
int i;
|
||||
unsigned nb_rates;
|
||||
|
||||
if (!st)
|
||||
return AVERROR(ENOMEM);
|
||||
|
Loading…
Reference in New Issue
Block a user