[codec,interleaved] fix bounds checks

This commit is contained in:
akallabeth 2024-04-19 10:29:24 +02:00 committed by akallabeth
parent b1f11bd8a4
commit a1c373314e
1 changed files with 2 additions and 2 deletions

View File

@ -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;