Skip to content

Commit

Permalink
Merge pull request #7829 from douzzer/20240804-SetDNSEntry-double-free
Browse files Browse the repository at this point in the history
20240804-SetDNSEntry-double-free
  • Loading branch information
SparkiDev authored Aug 5, 2024
2 parents 9aa0742 + d65be7a commit 54370cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions wolfcrypt/src/asn.c
Original file line number Diff line number Diff line change
Expand Up @@ -9177,7 +9177,7 @@ int EncryptContent(byte* input, word32 inputSz, byte* out, word32* outSz,
word32 seqSz;
word32 innerSz;
int ret;
int version, id, blockSz = 0;
int version, id = PBE_NONE, blockSz = 0;
#ifdef WOLFSSL_SMALL_STACK
byte* saltTmp = NULL;
byte* cbcIv = NULL;
Expand Down Expand Up @@ -13550,7 +13550,6 @@ static int SetDNSEntry(DecodedCert* cert, const char* str, int strLen,
dnsEntry->name = (char*)XMALLOC((size_t)strLen + 1, cert->heap,
DYNAMIC_TYPE_ALTNAME);
if (dnsEntry->name == NULL) {
XFREE(dnsEntry, cert->heap, DYNAMIC_TYPE_ALTNAME);
ret = MEMORY_E;
}
}
Expand Down
4 changes: 3 additions & 1 deletion wolfssl/wolfcrypt/asn.h
Original file line number Diff line number Diff line change
Expand Up @@ -2760,7 +2760,9 @@ enum PBESTypes {

PBES2 = 13, /* algo ID */
PBES1_MD5_DES = 3,
PBES1_SHA1_DES = 10
PBES1_SHA1_DES = 10,

PBE_NONE = 999
};

enum PKCSTypes {
Expand Down

0 comments on commit 54370cc

Please sign in to comment.