From: James Berry Date: Thu, 14 Jul 2011 19:53:50 +0000 (-0400) Subject: bug fix vpx_copy_and_extend_frame size issue X-Git-Tag: v0.9.7~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b6f367c3d25bdd87f80a8e5b5380963733c6f0a;p=libvpx bug fix vpx_copy_and_extend_frame size issue vpx_copy_and_extend_frame could incorrectly resize uv frames which could result in a crash. Change-Id: Ie96f7078b1e328b3907a06eebeee44ca39a2e898 --- diff --git a/vp8/common/extend.c b/vp8/common/extend.c index 036bafc5d..a2d325332 100644 --- a/vp8/common/extend.c +++ b/vp8/common/extend.c @@ -85,10 +85,10 @@ void vp8_copy_and_extend_frame(YV12_BUFFER_CONFIG *src, src->y_height, src->y_width, et, el, eb, er); - et = (et + 1) >> 1; - el = (el + 1) >> 1; - eb = (eb + 1) >> 1; - er = (er + 1) >> 1; + et = dst->border >> 1; + el = dst->border >> 1; + eb = (dst->border >> 1) + dst->uv_height - src->uv_height; + er = (dst->border >> 1) + dst->uv_width - src->uv_width; copy_and_extend_plane(src->u_buffer, src->uv_stride, dst->u_buffer, dst->uv_stride,