mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 13:30:48 +02:00
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:
+5
-2
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user