Skip to content

Commit

Permalink
Fixed #6005: Bounds checks in update_read_bitmap_data
Browse files Browse the repository at this point in the history
  • Loading branch information
akallabeth committed Apr 2, 2020
1 parent ed53cd1 commit f8890a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libfreerdp/core/update.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f8890a6

Please sign in to comment.