From 35ad48b8487d5812ed0f7774032f747d5b5310c9 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 26 Sep 2014 11:21:19 -0700 Subject: [PATCH] HistoHeapInit: correct positions allocation size Change-Id: I1879fd48bee3aea6f0504926d7030b504dd9be07 --- src/enc/histogram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/enc/histogram.c b/src/enc/histogram.c index abe14ef8..1042077c 100644 --- a/src/enc/histogram.c +++ b/src/enc/histogram.c @@ -586,7 +586,7 @@ static int HistoHeapInit(HistoHeap* const histo_heap, const int max_index) { histo_heap->heap = WebPSafeMalloc(max_index * max_index, sizeof(*histo_heap->heap)); histo_heap->positions = WebPSafeMalloc(max_index * max_index, - sizeof(*histo_heap->heap)); + sizeof(*histo_heap->positions)); return histo_heap->heap != NULL && histo_heap->positions != NULL; }