aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-16 14:06:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-16 14:10:31 +0200
commitb3970b39491ffab25a9c922f384855aca81d50b2 (patch)
treee7028548ef317b2e5deeab4528220af153dfe753
parente0fcd0294e2f6cc9a3ade974a561be54c9efbc31 (diff)
parent6fc8226e29055858f28973bb3d27b63b3b65e616 (diff)
downloadffmpeg-b3970b39491ffab25a9c922f384855aca81d50b2.tar.gz
Merge commit '6fc8226e29055858f28973bb3d27b63b3b65e616'
* commit '6fc8226e29055858f28973bb3d27b63b3b65e616': vp3: Check the framerate for validity Conflicts: libavcodec/vp3.c See: a56d963f111b1a192cdabb05500f8083bd77ca93 Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/vp3.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index fe4e48ba9d..a6e2d0eea7 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2225,7 +2225,11 @@ 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>0 && fps.den>0) {
+ 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);
}