[FFmpeg-cvslog] vp3: Check the framerate for validity
Martin Storsjö
git at videolan.org
Mon Sep 16 14:20:33 CEST 2013
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Thu Sep 12 12:27:58 2013 +0300| [6fc8226e29055858f28973bb3d27b63b3b65e616] | committer: Martin Storsjö
vp3: Check the framerate for validity
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6fc8226e29055858f28973bb3d27b63b3b65e616
---
libavcodec/vp3.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 0211537..a269dc3 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2199,6 +2199,10 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
fps.num = get_bits_long(gb, 32);
fps.den = get_bits_long(gb, 32);
if (fps.num && fps.den) {
+ if (fps.num < 0 || fps.den < 0) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid framerate\n");
+ return AVERROR_INVALIDDATA;
+ }
av_reduce(&avctx->time_base.num, &avctx->time_base.den,
fps.den, fps.num, 1<<30);
}
More information about the ffmpeg-cvslog
mailing list