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:
parent
c837b38dd3
commit
47d029a4c1
@ -104,6 +104,11 @@ static int au_read_header(AVFormatContext *s)
|
|||||||
return AVERROR_INVALIDDATA;
|
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 */
|
/* now we are ready: build format streams */
|
||||||
st = avformat_new_stream(s, NULL);
|
st = avformat_new_stream(s, NULL);
|
||||||
if (!st)
|
if (!st)
|
||||||
|
Loading…
Reference in New Issue
Block a user