[FFmpeg-cvslog] r3d: Add more input value validation
Martin Storsjö
git at videolan.org
Thu Jan 16 22:49:49 CET 2014
ffmpeg | branch: release/0.10 | Martin Storsjö <martin at martin.st> | Thu Sep 19 17:02:36 2013 +0300| [29fa517d40ed485a24128d005ee796f0355398e1] | committer: Luca Barbato
r3d: Add more input value validation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
Conflicts:
libavformat/r3d.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=29fa517d40ed485a24128d005ee796f0355398e1
---
libavformat/r3d.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index 73e7398..877c901 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -277,6 +277,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, "Bad sample rate\n");
+ return AVERROR_INVALIDDATA;
+ }
samples = avio_rb32(s->pb);
More information about the ffmpeg-cvslog
mailing list