Skip to content
Snippets Groups Projects
Commit 2d2ed8b0 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avformat/aiffdec: Check sample_rate


Reviewed-by: default avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1b04836d)
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent f8b4426c
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment