diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-04-25 20:16:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-09 13:54:52 +0200 |
commit | 14b04b9fd6e1d35b1d04d67b09e7e05365e52651 (patch) | |
tree | c10042a0db0fd5ee17ca48dfbd8c884dd318c4c9 | |
parent | 2c9e43e7f8b24acdf840758c093119d00ee9a8b9 (diff) | |
download | ffmpeg-14b04b9fd6e1d35b1d04d67b09e7e05365e52651.tar.gz |
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>
(cherry picked from commit 1b865cc703d29cb307e1fa628aa02940d54eb42a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/qcp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/qcp.c b/libavformat/qcp.c index b842e2633c..90954a39e9 100644 --- a/libavformat/qcp.c +++ b/libavformat/qcp.c @@ -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); |