From 7982914c37f21409f60c97112c939e6261981806 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 3 Jun 2016 18:04:54 -0700 Subject: [PATCH] ivfdec: tolerate invalid framerates (2) add an upper bound to the framerate denominator above which 30fps will be reported; fixes warning in corrupt / fuzzed files Change-Id: I46a6a6f34ab756535cd009fe12273d83dcc1e9f1 --- ivfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ivfdec.c b/ivfdec.c index 6d1d679..7fc25a0 100644 --- a/ivfdec.c +++ b/ivfdec.c @@ -23,7 +23,7 @@ static void fix_framerate(int *num, int *den) { // we can guess the framerate using only the timebase in this // case. Other files would require reading ahead to guess the // timebase, like we do for webm. - if (*den > 0 && *num > 0 && *num < 1000) { + if (*den > 0 && *den < 1000000000 && *num > 0 && *num < 1000) { // Correct for the factor of 2 applied to the timebase in the encoder. if (*num & 1) *den *= 2; -- 2.7.4