From: Yaowu Xu Date: Thu, 23 Jan 2014 23:43:08 +0000 (-0800) Subject: Changed to prevent decoder crash X-Git-Tag: v1.4.0~2598^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=10b0813a9cbdb76df6a2ec8a011bc5862082b37e;p=libvpx Changed to prevent decoder crash The change prevent a decoder crash for invalid stream with negative size. Change-Id: I7411765f3524c783058fa3d436549be4e75d8969 --- diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index d66ee2730..fa680d983 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -743,7 +743,7 @@ static void setup_frame_size_with_refs(VP9D_COMP *pbi, 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");