Fixed zero sized allocation.

This commit is contained in:
Armin Novak 2018-11-29 11:05:13 +01:00
parent c97d4eec67
commit 16a7613194

View File

@ -2098,6 +2098,9 @@ static CACHE_BITMAP_V2_ORDER* update_read_cache_bitmap_v2_order(rdpUpdate* updat
if (Stream_GetRemainingLength(s) < cache_bitmap_v2->bitmapLength)
goto fail;
if (cache_bitmap_v2->bitmapLength == 0)
goto fail;
cache_bitmap_v2->bitmapDataStream = malloc(cache_bitmap_v2->bitmapLength);
if (!cache_bitmap_v2->bitmapDataStream)