Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-04-25 21:16:38 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-06 14:54:16 +0300
commit7da58f8fe7886424360fdb267d7191bd18e83924 (patch)
tree5af54b6d849d4d2904e55753cc70a6737555ca71
parentdda8d338a139e6771d352cbc1c0e59acf7f1657d (diff)
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/qcp.c b/libavformat/qcp.c
index 168030dc16..4478875f2d 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);