diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 12 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/asn1/tasn_dec.c | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index d86bc4e091..c8b379f371 100644 --- a/src/lib/libcrypto/asn1/tasn_dec.c +++ b/src/lib/libcrypto/asn1/tasn_dec.c | |||
@@ -382,14 +382,10 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, | |||
382 | goto err; | 382 | goto err; |
383 | } | 383 | } |
384 | 384 | ||
385 | if (!*pval) { | 385 | if (!*pval && !ASN1_item_ex_new(pval, it)) { |
386 | if (!ASN1_item_ex_new(pval, it)) { | 386 | ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, |
387 | ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, | 387 | ERR_R_NESTED_ASN1_ERROR); |
388 | ERR_R_NESTED_ASN1_ERROR); | 388 | goto err; |
389 | goto err; | ||
390 | } | ||
391 | } else { | ||
392 | memset(*pval, 0, it->size); | ||
393 | } | 389 | } |
394 | 390 | ||
395 | if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) | 391 | if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) |
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_dec.c b/src/lib/libssl/src/crypto/asn1/tasn_dec.c index d86bc4e091..c8b379f371 100644 --- a/src/lib/libssl/src/crypto/asn1/tasn_dec.c +++ b/src/lib/libssl/src/crypto/asn1/tasn_dec.c | |||
@@ -382,14 +382,10 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, | |||
382 | goto err; | 382 | goto err; |
383 | } | 383 | } |
384 | 384 | ||
385 | if (!*pval) { | 385 | if (!*pval && !ASN1_item_ex_new(pval, it)) { |
386 | if (!ASN1_item_ex_new(pval, it)) { | 386 | ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, |
387 | ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, | 387 | ERR_R_NESTED_ASN1_ERROR); |
388 | ERR_R_NESTED_ASN1_ERROR); | 388 | goto err; |
389 | goto err; | ||
390 | } | ||
391 | } else { | ||
392 | memset(*pval, 0, it->size); | ||
393 | } | 389 | } |
394 | 390 | ||
395 | if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) | 391 | if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) |