[core,update] fix missing plausibility check
abort parsing of cache brush if not enough data is available.
This commit is contained in:
parent
626d10a94a
commit
cb15c1c78a
@ -2031,7 +2031,9 @@ static BOOL update_send_cache_brush(rdpContext* context, const CACHE_BRUSH_ORDER
|
||||
return FALSE;
|
||||
|
||||
const size_t em = Stream_GetPosition(s);
|
||||
WINPR_ASSERT(em > bm + 13);
|
||||
if (em <= bm + 13)
|
||||
return FALSE;
|
||||
|
||||
const size_t orderLength = (em - bm) - 13;
|
||||
WINPR_ASSERT(orderLength <= UINT16_MAX);
|
||||
Stream_SetPosition(s, bm);
|
||||
|
Loading…
Reference in New Issue
Block a user