Commit 99b1b2b1 authored by Michael Niedermayer's avatar Michael Niedermayer

r3d: check that sampling rate is non negative.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent df92ac18
......@@ -285,6 +285,10 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
dts = avio_rb32(s->pb);
st->codec->sample_rate = avio_rb32(s->pb);
if (st->codec->sample_rate < 0) {
av_log(s, AV_LOG_ERROR, "negative sample rate\n");
return AVERROR_INVALIDDATA;
}
samples = avio_rb32(s->pb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment