Skip to content

Commit f8890a6

Browse files
committed
Fixed #6005: Bounds checks in update_read_bitmap_data
1 parent ed53cd1 commit f8890a6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: libfreerdp/core/update.c

+3
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ static BOOL update_read_bitmap_data(rdpUpdate* update, wStream* s, BITMAP_DATA*
103103
{
104104
if (!(bitmapData->flags & NO_BITMAP_COMPRESSION_HDR))
105105
{
106+
if (Stream_GetRemainingLength(s) < 8)
107+
return FALSE;
108+
106109
Stream_Read_UINT16(s,
107110
bitmapData->cbCompFirstRowSize); /* cbCompFirstRowSize (2 bytes) */
108111
Stream_Read_UINT16(s,

0 commit comments

Comments
 (0)