diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index 086469682..0bae7f379 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -103,6 +103,9 @@ static BOOL update_read_bitmap_data(rdpUpdate* update, wStream* s, BITMAP_DATA* { if (!(bitmapData->flags & NO_BITMAP_COMPRESSION_HDR)) { + if (Stream_GetRemainingLength(s) < 8) + return FALSE; + Stream_Read_UINT16(s, bitmapData->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */ Stream_Read_UINT16(s,