We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96138e7 commit 95f8d74Copy full SHA for 95f8d74
src/x509_str.c
@@ -365,13 +365,14 @@ int wolfSSL_X509_verify_cert(WOLFSSL_X509_STORE_CTX* ctx)
365
(wolfSSL_sk_X509_num(certs) > numInterAdd)) {
366
for (i = wolfSSL_sk_X509_num(certs) - 1;
367
i > (numInterAdd > 0 ? numInterAdd - 1 : 0);
368
- i++) {
+ i--) {
369
tmp = wolfSSL_sk_X509_value(certs, i);
370
- if (wolfSSL_X509_NAME_cmp(
+ if (tmp != NULL && wolfSSL_X509_NAME_cmp(
371
&issuer->subject, &tmp->subject) == 0) {
372
ret = WOLFSSL_SUCCESS;
373
break;
374
}
375
+ tmp = NULL;
376
377
378
0 commit comments