From 66ed01062e37411a4c6fe8a7d1a83325f5ecacc1 Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Fri, 30 Mar 2012 21:37:30 +0200 Subject: [PATCH] cache: fix off-by-one-of-the-wrong-kind in BITMAP_CACHE_WAITING_LIST_INDEX handling --- libfreerdp-cache/bitmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfreerdp-cache/bitmap.c b/libfreerdp-cache/bitmap.c index e3e2303fa..a382bfe0c 100644 --- a/libfreerdp-cache/bitmap.c +++ b/libfreerdp-cache/bitmap.c @@ -258,7 +258,7 @@ rdpBitmapCache* bitmap_cache_new(rdpSettings* settings) { bitmap_cache->cells[i].number = settings->bitmapCacheV2CellInfo[i].numEntries; /* allocate an extra entry for BITMAP_CACHE_WAITING_LIST_INDEX */ - bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * bitmap_cache->cells[i].number + 1); + bitmap_cache->cells[i].entries = (rdpBitmap**) xzalloc(sizeof(rdpBitmap*) * (bitmap_cache->cells[i].number + 1)); } }