git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac9d159
)
vp3: Check the framerate for validity
author
Martin Storsjö
<martin@martin.st>
Thu, 12 Sep 2013 09:27:58 +0000
(12:27 +0300)
committer
Martin Storsjö
<martin@martin.st>
Mon, 16 Sep 2013 08:04:52 +0000
(11:04 +0300)
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/vp3.c
patch
|
blob
|
history
diff --git
a/libavcodec/vp3.c
b/libavcodec/vp3.c
index
0211537
..
a269dc3
100644
(file)
--- 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);
}