[FFmpeg-cvslog] avformat/aiffdec: Check sample_rate
Michael Niedermayer
git at videolan.org
Wed Apr 6 22:54:58 EEST 2022
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Sun Oct 31 00:02:04 2021 +0200| [e3a69dd7a00aa8d377236ec59610052fc7501f7e] | committer: Michael Niedermayer
avformat/aiffdec: Check sample_rate
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 1b04836dff9958e8bfdbed2746b8c40b1e119ecc)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3a69dd7a00aa8d377236ec59610052fc7501f7e
---
libavformat/aiffdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index fb5935c746..cb96c02b6f 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -122,6 +122,9 @@ static int get_aiff_header(AVFormatContext *s, int size,
sample_rate = val << exp;
else
sample_rate = (val + (1ULL<<(-exp-1))) >> -exp;
+ if (sample_rate <= 0)
+ return AVERROR_INVALIDDATA;
+
par->sample_rate = sample_rate;
if (size < 18)
return AVERROR_INVALIDDATA;
More information about the ffmpeg-cvslog
mailing list