[FFmpeg-cvslog] r3d: check that sampling rate is non negative.
Michael Niedermayer
git at videolan.org
Tue Jan 29 18:23:05 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jan 29 17:13:45 2013 +0100| [99b1b2b1c65969ee324d754ea47e04a0a3f685a8] | committer: Michael Niedermayer
r3d: check that sampling rate is non negative.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=99b1b2b1c65969ee324d754ea47e04a0a3f685a8
---
libavformat/r3d.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index 5ee0b93..3b3ecce 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);
More information about the ffmpeg-cvslog
mailing list