projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix undefined behaviour in e_aes_cbc_hmac_sha256.c and e_aes_cbc_hmac_sha1.c
[oweals/openssl.git]
/
crypto
/
pkcs12
/
p12_mutl.c
diff --git
a/crypto/pkcs12/p12_mutl.c
b/crypto/pkcs12/p12_mutl.c
index d6b891920ce507d7156590ea8b0f1d5f273db72e..899a12e1345d156d08c14e3c0883613e717cbfd7 100644
(file)
--- a/
crypto/pkcs12/p12_mutl.c
+++ b/
crypto/pkcs12/p12_mutl.c
@@
-204,6
+204,9
@@
int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen,
{
X509_ALGOR *macalg;
+ PKCS12_MAC_DATA_free(p12->mac);
+ p12->mac = NULL;
+
if ((p12->mac = PKCS12_MAC_DATA_new()) == NULL)
return PKCS12_ERROR;
if (iter > 1) {