diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index 5e0757dcb..c2ca42cc4 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -208,11 +208,9 @@ BITMAP_UPDATE* update_read_bitmap_update(rdpUpdate* update, wStream* s) if (bitmapUpdate->number > bitmapUpdate->count) { - UINT16 count; - BITMAP_DATA* newdata; - count = bitmapUpdate->number * 2; - newdata = (BITMAP_DATA*) realloc(bitmapUpdate->rectangles, - sizeof(BITMAP_DATA) * count); + UINT32 count = bitmapUpdate->number * 2; + BITMAP_DATA* newdata = (BITMAP_DATA*) realloc(bitmapUpdate->rectangles, + sizeof(BITMAP_DATA) * count); if (!newdata) goto fail;