Skip to content

Commit

Permalink
[codec,nsc] fix missing check
Browse files Browse the repository at this point in the history
in nsc_rle_decode abort if there are more bytes to be read then there
are left.
  • Loading branch information
akallabeth authored and mfleisz committed Apr 16, 2024
1 parent 2500fb7 commit d58cbc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libfreerdp/codec/nsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ static BOOL nsc_rle_decode(const BYTE* in, size_t inSize, BYTE* out, UINT32 outS
len |= ((UINT32)(*in++)) << 24U;
}

if (outSize < len)
if ((outSize < len) || (left < len))
return FALSE;

outSize -= len;
Expand Down

0 comments on commit d58cbc9

Please sign in to comment.