shithub: libvpx

Download patch

ref: 0393e558a4710b31836ead8f9832f6b270daf57c
parent: 9471bc2e9e86a3d2e8a823340291c459e97e7727
author: Ronald S. Bultje <rbultje@google.com>
date: Wed Aug 15 18:20:24 EDT 2012

Fix stack overrun in calculating segmentation map coding method.

This caused spurious crashes on encodes, frustratingly often only on
high-definition material.

Change-Id: Ia8c1dfc420d598ca92108bd9cc2df7450e8d10a2

--- a/vp8/encoder/segmentation.c
+++ b/vp8/encoder/segmentation.c
@@ -111,7 +111,8 @@
   int i;
 
   // Blank the strtucture to start with
-  vpx_memset(segment_tree_probs, 0, sizeof(segment_tree_probs));
+  vpx_memset(segment_tree_probs, 0,
+             MB_FEATURE_TREE_PROBS * sizeof(*segment_tree_probs));
 
   // Total count for all segments
   count1 = segcounts[0] + segcounts[1];
--