mirror of https://github.com/FreeRDP/FreeRDP
[codec,interleaved] fix bounds checks
This commit is contained in:
parent
b1f11bd8a4
commit
a1c373314e
|
@ -262,7 +262,7 @@ static UINT ExtractRunLengthRegular(const BYTE* pbOrderHdr, const BYTE* pbEnd, U
|
|||
runLength = *pbOrderHdr & g_MaskRegularRunLength;
|
||||
if (runLength == 0)
|
||||
{
|
||||
if (!buffer_within_range(pbOrderHdr, 1, pbEnd))
|
||||
if (!buffer_within_range(pbOrderHdr, 2, pbEnd))
|
||||
{
|
||||
*advance = 0;
|
||||
return 0;
|
||||
|
@ -305,7 +305,7 @@ static UINT ExtractRunLengthLite(const BYTE* pbOrderHdr, const BYTE* pbEnd, UINT
|
|||
runLength = *pbOrderHdr & g_MaskLiteRunLength;
|
||||
if (runLength == 0)
|
||||
{
|
||||
if (!buffer_within_range(pbOrderHdr, 1, pbEnd))
|
||||
if (!buffer_within_range(pbOrderHdr, 2, pbEnd))
|
||||
{
|
||||
*advance = 0;
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue