src/x509.c: in x509_aia_append_string(), use heap pointer from supplied *head, and initialize WOLFSSL_STACK.type (fixes "Conditional jump or move depends on uninitialised value(s)" from 08c1397cc1);

wolfssl/wolfcrypt/asn.h: use WC_BITFIELD for extAuthInfoListSz and extAuthInfoListOverflow bitfields, for C89 compat (fixes -Wpedantic from 08c1397cc1).
This commit is contained in:
Daniel Pouzzner
2026-02-05 10:04:17 -06:00
parent c7ed5ff179
commit 0cc1dc29c4
2 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -15002,8 +15002,9 @@ static WOLFSSL_STACK* x509_aia_append_string(WOLFSSL_STACK** head,
WOLFSSL_STACK* node;
char* url;
node = (WOLFSSL_STACK*)XMALLOC(sizeof(WOLFSSL_STACK) + uriSz + 1, NULL,
DYNAMIC_TYPE_OPENSSL);
node = (WOLFSSL_STACK*)XMALLOC(sizeof(WOLFSSL_STACK) + uriSz + 1,
*head ? (*head)->heap : NULL,
DYNAMIC_TYPE_OPENSSL);
if (node == NULL)
return NULL;
@@ -15012,9 +15013,11 @@ static WOLFSSL_STACK* x509_aia_append_string(WOLFSSL_STACK** head,
XMEMCPY(url, uri, uriSz);
url[uriSz] = '\0';
node->heap = *head ? (*head)->heap : NULL;
node->data.string = url;
node->next = NULL;
node->num = 1;
node->type = STACK_TYPE_STRING;
if (*head == NULL) {
*head = node;
+2 -2
View File
@@ -2075,8 +2075,8 @@ struct DecodedCert {
#endif /* WOLFSSL_DUAL_ALG_CERTS */
WOLFSSL_AIA_ENTRY extAuthInfoList[WOLFSSL_MAX_AIA_ENTRIES];
byte extAuthInfoListSz:7;
byte extAuthInfoListOverflow:1;
WC_BITFIELD extAuthInfoListSz:7;
WC_BITFIELD extAuthInfoListOverflow:1;
};
#if defined(WOLFSSL_SM2) && defined(WOLFSSL_SM3)