shithub: libvpx

Download patch

ref: 7a8e0a29359f561e7e2f22ab553f5136c361239e
parent: e105e245ef02e7ce3c78950af01cfc78ce2a7459
author: Timothy B. Terriberry <tterribe@xiph.org>
date: Wed May 5 15:14:36 EDT 2010

Fix harmless off-by-1 error.

The memory being zeroed in vp8_update_mode_info_border() was just
 allocated with calloc, and so the entire function is actually
 redundant, but it should be made correct in case someone expects
 it to actually work in the future.

Change-Id: If7a84e489157ab34ab77ec6e2fe034fb71cf8c79

--- a/vp8/common/alloccommon.c
+++ b/vp8/common/alloccommon.c
@@ -24,7 +24,7 @@
 void vp8_update_mode_info_border(MODE_INFO *mi, int rows, int cols)
 {
     int i;
-    vpx_memset(mi - cols - 1, 0, sizeof(MODE_INFO) * cols + 1);
+    vpx_memset(mi - cols - 2, 0, sizeof(MODE_INFO) * (cols + 1));
 
     for (i = 0; i < rows; i++)
     {