diff options
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_mutl.c')
-rw-r--r-- | src/lib/libcrypto/pkcs12/p12_mutl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c index 0fb67f74b8..4886b9b289 100644 --- a/src/lib/libcrypto/pkcs12/p12_mutl.c +++ b/src/lib/libcrypto/pkcs12/p12_mutl.c | |||
@@ -148,7 +148,10 @@ int PKCS12_setup_mac (PKCS12 *p12, int iter, unsigned char *salt, int saltlen, | |||
148 | PKCS12err(PKCS12_F_PKCS12_SETUP_MAC, ERR_R_MALLOC_FAILURE); | 148 | PKCS12err(PKCS12_F_PKCS12_SETUP_MAC, ERR_R_MALLOC_FAILURE); |
149 | return 0; | 149 | return 0; |
150 | } | 150 | } |
151 | ASN1_INTEGER_set(p12->mac->iter, iter); | 151 | if (!ASN1_INTEGER_set(p12->mac->iter, iter)) { |
152 | PKCS12err(PKCS12_F_PKCS12_SETUP_MAC, ERR_R_MALLOC_FAILURE); | ||
153 | return 0; | ||
154 | } | ||
152 | } | 155 | } |
153 | if (!saltlen) saltlen = PKCS12_SALT_LEN; | 156 | if (!saltlen) saltlen = PKCS12_SALT_LEN; |
154 | p12->mac->salt->length = saltlen; | 157 | p12->mac->salt->length = saltlen; |