diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-31 00:02:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-04-07 16:26:59 +0200 |
commit | f2a206309e00200de0e75bb351be56571c2f6e70 (patch) | |
tree | 770beabd6a5dce580de16bb15d3979a14e5efeb2 /libavformat | |
parent | 84fdfdf8595150c04b86febd1ef2eae3878c84b8 (diff) | |
download | ffmpeg-f2a206309e00200de0e75bb351be56571c2f6e70.tar.gz |
avformat/aiffdec: Check sample_rate
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1b04836dff9958e8bfdbed2746b8c40b1e119ecc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/aiffdec.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 833ab30643..2f27baf46f 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -121,6 +121,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; |