From 00046171a5dedb1b508d104e085bf11059990069 Mon Sep 17 00:00:00 2001 From: Urvang Joshi Date: Thu, 25 Apr 2013 12:08:40 -0700 Subject: [PATCH] VP8GetInfo(): Check for zero width or height. Change-Id: I0bf40621ed0776e1a185ad8abab5a914a3d29d69 --- src/dec/vp8.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dec/vp8.c b/src/dec/vp8.c index 4399534c..6fb6ce02 100644 --- a/src/dec/vp8.c +++ b/src/dec/vp8.c @@ -121,6 +121,9 @@ int VP8GetInfo(const uint8_t* data, size_t data_size, size_t chunk_size, if (((bits >> 5)) >= chunk_size) { // partition_length return 0; // inconsistent size information. } + if (w == 0 || h == 0) { + return 0; // We don't support both width and height to be zero. + } if (width) { *width = w;