From: hkuang Date: Thu, 10 Jul 2014 15:03:56 +0000 (-0700) Subject: Fix a bug in boundary checking. X-Git-Tag: v1.4.0~1245 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=51e9788e58eb588f1cf89226a514e824e9e63d3b;p=libvpx Fix a bug in boundary checking. Change-Id: Ifc741da9da6f61c8d3c1f675ec6b8a96570f877d --- diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c index d4fcb62f8..224debbdc 100644 --- a/vp9/common/vp9_reconinter.c +++ b/vp9/common/vp9_reconinter.c @@ -389,7 +389,7 @@ static void dec_build_inter_predictors(MACROBLOCKD *xd, int plane, int block, } // Skip border extension if block is inside the frame. - if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width || + if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 || y0 < 0 || y0 > frame_height - 1 || y1 < 0 || y1 > frame_height - 1) { uint8_t *buf_ptr1 = ref_frame + y0 * pre_buf->stride + x0; // Extend the border.