shithub: libvpx

Download patch

ref: 10b0813a9cbdb76df6a2ec8a011bc5862082b37e
parent: a72cc78ec581a12affea7e053cd6e56f226270c3
author: Yaowu Xu <yaowu@google.com>
date: Thu Jan 23 10:43:08 EST 2014

Changed to prevent decoder crash

The change prevent a decoder crash for invalid stream with negative
size.

Change-Id: I7411765f3524c783058fa3d436549be4e75d8969

--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -743,7 +743,7 @@
   if (!found)
     read_frame_size(rb, &width, &height);
 
-  if (!width || !height)
+  if (width <= 0 || height <= 0)
     vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
                        "Referenced frame with invalid size");
 
--