[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:
Armin Novak
2026-03-03 13:58:09 +01:00
parent 125b1ce99e
commit a9e0abf2ea

View File

@@ -2354,6 +2354,8 @@ static CACHE_BITMAP_ORDER* update_read_cache_bitmap_order(rdpUpdate* update, wSt
goto fail;
Stream_Read(s, bitmapComprHdr, 8); /* bitmapComprHdr (8 bytes) */
if (cache_bitmap->bitmapLength < 8)
goto fail;
cache_bitmap->bitmapLength -= 8;
}
}