]> granicus.if.org Git - libvpx/commitdiff
Fix harmless off-by-1 error.
authorTimothy B. Terriberry <tterribe@xiph.org>
Wed, 5 May 2010 23:14:36 +0000 (19:14 -0400)
committerTimothy B. Terriberry <tterribe@xiph.org>
Fri, 27 Aug 2010 23:07:54 +0000 (16:07 -0700)
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

vp8/common/alloccommon.c

index 369d48101929dad946083ae545ae9e1196835f33..3fcc3088c2c0b9d0b48b4a124b32777c62228f67 100644 (file)
@@ -24,7 +24,7 @@ extern  void vp8_init_scan_order_mask();
 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++)
     {