Skip to content

Commit 8a93883

Browse files
committed
Fix bug in ParseCRL_Extensions
1 parent 0cc0bb0 commit 8a93883

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

wolfcrypt/src/asn.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -39163,6 +39163,7 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, word32 idx,
3916339163
ret = GetASN_Items(certExtASN, dataASN, certExtASN_Length, 0, buf, &idx,
3916439164
maxIdx);
3916539165
if (ret == 0) {
39166+
word32 localIdx = idx;
3916639167
/* OID in extension. */
3916739168
word32 oid = dataASN[CERTEXTASN_IDX_OID].data.oid.sum;
3916839169
/* Length of extension data. */
@@ -39172,7 +39173,7 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, word32 idx,
3917239173
#ifndef NO_SKID
3917339174
/* Parse Authority Key Id extension.
3917439175
* idx is at start of OCTET_STRING data. */
39175-
ret = ParseCRL_AuthKeyIdExt(buf + idx, length, dcrl);
39176+
ret = ParseCRL_AuthKeyIdExt(buf + localIdx, length, dcrl);
3917639177
if (ret != 0) {
3917739178
WOLFSSL_MSG("\tcouldn't parse AuthKeyId extension");
3917839179
}
@@ -39195,7 +39196,7 @@ static int ParseCRL_Extensions(DecodedCRL* dcrl, const byte* buf, word32 idx,
3919539196
}
3919639197
}
3919739198
if (ret == 0) {
39198-
ret = GetInt(m, buf, &idx, maxIdx);
39199+
ret = GetInt(m, buf, &localIdx, maxIdx);
3919939200
}
3920039201
if (ret == 0) {
3920139202
dcrl->crlNumber = (int)m->dp[0];

0 commit comments

Comments
 (0)