mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
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>
This commit is contained in:
parent
b239ccff7d
commit
b982f9fe9d
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user