1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

au: validate sample rate

This commit is contained in:
Justin Ruggles 2012-12-23 13:39:31 -05:00
parent c837b38dd3
commit 47d029a4c1

View File

@ -104,6 +104,11 @@ static int au_read_header(AVFormatContext *s)
return AVERROR_INVALIDDATA;
}
if (rate == 0 || rate > INT_MAX) {
av_log(s, AV_LOG_ERROR, "Invalid sample rate: %u\n", rate);
return AVERROR_INVALIDDATA;
}
/* now we are ready: build format streams */
st = avformat_new_stream(s, NULL);
if (!st)