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>2022-09-17 17:32:09 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-11-04 01:29:49 +0300
commit2a6e750c87c2b5b87817bf456735c74cf79b4694 (patch)
treec91bff9b0f437f5e51ccf7c37bc42cc6c7a87609
parented455b98d052808c39192c0ce4335ac017db6127 (diff)
avformat/aiffdec: Use 64bit for block_duration use
Fixes: signed integer overflow: 3 * -2147483648 cannot be represented in type 'int' Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6668935979728896 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 9303ba272e988d87084880c57056b750cc5ffd08) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/aiffdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index 154e5eaf7a..0ebfdee448 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -425,7 +425,7 @@ static int aiff_read_packet(AVFormatContext *s,
pkt->flags &= ~AV_PKT_FLAG_CORRUPT;
/* Only one stream in an AIFF file */
pkt->stream_index = 0;
- pkt->duration = (res / st->codecpar->block_align) * aiff->block_duration;
+ pkt->duration = (res / st->codecpar->block_align) * (int64_t) aiff->block_duration;
return 0;
}