mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
Merge pull request #3007 from embhorn/zd10318
Fix OOB access in ParseCRL
This commit is contained in:
@@ -17418,7 +17418,7 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* prase crl buffer into decoded state, 0 on success */
|
/* parse crl buffer into decoded state, 0 on success */
|
||||||
int ParseCRL(DecodedCRL* dcrl, const byte* buff, word32 sz, void* cm)
|
int ParseCRL(DecodedCRL* dcrl, const byte* buff, word32 sz, void* cm)
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
@@ -17446,10 +17446,10 @@ int ParseCRL(DecodedCRL* dcrl, const byte* buff, word32 sz, void* cm)
|
|||||||
return ASN_PARSE_E;
|
return ASN_PARSE_E;
|
||||||
dcrl->sigIndex = len + idx;
|
dcrl->sigIndex = len + idx;
|
||||||
|
|
||||||
if (ParseCRL_CertList(dcrl, buff, &idx, idx + len) < 0)
|
if (ParseCRL_CertList(dcrl, buff, &idx, dcrl->sigIndex) < 0)
|
||||||
return ASN_PARSE_E;
|
return ASN_PARSE_E;
|
||||||
|
|
||||||
if (ParseCRL_Extensions(dcrl, buff, &idx, idx + len) < 0)
|
if (ParseCRL_Extensions(dcrl, buff, &idx, dcrl->sigIndex) < 0)
|
||||||
return ASN_PARSE_E;
|
return ASN_PARSE_E;
|
||||||
|
|
||||||
idx = dcrl->sigIndex;
|
idx = dcrl->sigIndex;
|
||||||
|
Reference in New Issue
Block a user