cache: fix off-by-one-of-the-wrong-kind in BITMAP_CACHE_WAITING_LIST_INDEX handling

This commit is contained in:
Mads Kiilerich 2012-03-30 21:37:30 +02:00
parent 18c35823f2
commit 66ed01062e

View File

@ -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));
}
}