[FFmpeg-cvslog] avformat/xwma: sanity check bits_per_coded_sample
Michael Niedermayer
git at videolan.org
Sun Apr 14 23:58:40 EEST 2024
ffmpeg | branch: release/3.4 | Michael Niedermayer <michael at niedermayer.cc> | Sat Sep 30 23:55:20 2023 +0200| [283e077dc62c8cccf24a073eef53a35a7cccb793] | committer: Michael Niedermayer
avformat/xwma: sanity check bits_per_coded_sample
Fixes: signed integer overflow: 65312 * 524296 cannot be represented in type 'int'
Fixes: 51896/clusterfuzz-testcase-minimized-ffmpeg_dem_XWMA_fuzzer-6595971445555200
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit fe6ce28d118d6030984e1ee5c2d92e98514fe3d1)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=283e077dc62c8cccf24a073eef53a35a7cccb793
---
libavformat/xwma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/xwma.c b/libavformat/xwma.c
index 8e0f59fab1..23a68f6819 100644
--- a/libavformat/xwma.c
+++ b/libavformat/xwma.c
@@ -127,7 +127,7 @@ static int xwma_read_header(AVFormatContext *s)
st->codecpar->channels);
return AVERROR_INVALIDDATA;
}
- if (!st->codecpar->bits_per_coded_sample) {
+ if (!st->codecpar->bits_per_coded_sample || st->codecpar->bits_per_coded_sample > 64) {
av_log(s, AV_LOG_WARNING, "Invalid bits_per_coded_sample: %d\n",
st->codecpar->bits_per_coded_sample);
return AVERROR_INVALIDDATA;
More information about the ffmpeg-cvslog
mailing list