diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-29 20:13:45 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-29 20:13:45 +0400 |
commit | 99b1b2b1c65969ee324d754ea47e04a0a3f685a8 (patch) | |
tree | e848f3a672e2b0be94f5465ef00a597939d95bd8 /libavformat/r3d.c | |
parent | df92ac18528bac4566fc4f5ba4d607c1265791ea (diff) |
r3d: check that sampling rate is non negative.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/r3d.c')
-rw-r--r-- | libavformat/r3d.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/r3d.c b/libavformat/r3d.c index 5ee0b93686..3b3ecce3d9 100644 --- a/libavformat/r3d.c +++ b/libavformat/r3d.c @@ -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); |