mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[core,orders] improve input validation
check length before subtracting. Might underflow and be cought by the next check, but lets be strict.
This commit is contained in:
@@ -2354,6 +2354,8 @@ static CACHE_BITMAP_ORDER* update_read_cache_bitmap_order(rdpUpdate* update, wSt
|
|||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
Stream_Read(s, bitmapComprHdr, 8); /* bitmapComprHdr (8 bytes) */
|
Stream_Read(s, bitmapComprHdr, 8); /* bitmapComprHdr (8 bytes) */
|
||||||
|
if (cache_bitmap->bitmapLength < 8)
|
||||||
|
goto fail;
|
||||||
cache_bitmap->bitmapLength -= 8;
|
cache_bitmap->bitmapLength -= 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user