diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 18 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/asn1/tasn_dec.c | 18 |
2 files changed, 16 insertions, 20 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index 66f039806e..560b6f3d5f 100644 --- a/src/lib/libcrypto/asn1/tasn_dec.c +++ b/src/lib/libcrypto/asn1/tasn_dec.c | |||
| @@ -172,12 +172,6 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, | |||
| 172 | if (!pval) | 172 | if (!pval) |
| 173 | return 0; | 173 | return 0; |
| 174 | 174 | ||
| 175 | /* always start fresh */ | ||
| 176 | if (0 && *pval) { | ||
| 177 | ASN1_item_ex_free(pval, it); | ||
| 178 | *pval = NULL; | ||
| 179 | } | ||
| 180 | |||
| 181 | if (aux && aux->asn1_cb) | 175 | if (aux && aux->asn1_cb) |
| 182 | asn1_cb = aux->asn1_cb; | 176 | asn1_cb = aux->asn1_cb; |
| 183 | else | 177 | else |
| @@ -388,10 +382,14 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, | |||
| 388 | goto err; | 382 | goto err; |
| 389 | } | 383 | } |
| 390 | 384 | ||
| 391 | if (!*pval && !ASN1_item_ex_new(pval, it)) { | 385 | if (!*pval) { |
| 392 | ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, | 386 | if (!ASN1_item_ex_new(pval, it)) { |
| 393 | ERR_R_NESTED_ASN1_ERROR); | 387 | ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, |
| 394 | goto err; | 388 | ERR_R_NESTED_ASN1_ERROR); |
| 389 | goto err; | ||
| 390 | } | ||
| 391 | } else { | ||
| 392 | memset(*pval, 0, it->size); | ||
| 395 | } | 393 | } |
| 396 | 394 | ||
| 397 | if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) | 395 | 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 66f039806e..560b6f3d5f 100644 --- a/src/lib/libssl/src/crypto/asn1/tasn_dec.c +++ b/src/lib/libssl/src/crypto/asn1/tasn_dec.c | |||
| @@ -172,12 +172,6 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, | |||
| 172 | if (!pval) | 172 | if (!pval) |
| 173 | return 0; | 173 | return 0; |
| 174 | 174 | ||
| 175 | /* always start fresh */ | ||
| 176 | if (0 && *pval) { | ||
| 177 | ASN1_item_ex_free(pval, it); | ||
| 178 | *pval = NULL; | ||
| 179 | } | ||
| 180 | |||
| 181 | if (aux && aux->asn1_cb) | 175 | if (aux && aux->asn1_cb) |
| 182 | asn1_cb = aux->asn1_cb; | 176 | asn1_cb = aux->asn1_cb; |
| 183 | else | 177 | else |
| @@ -388,10 +382,14 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len, | |||
| 388 | goto err; | 382 | goto err; |
| 389 | } | 383 | } |
| 390 | 384 | ||
| 391 | if (!*pval && !ASN1_item_ex_new(pval, it)) { | 385 | if (!*pval) { |
| 392 | ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, | 386 | if (!ASN1_item_ex_new(pval, it)) { |
| 393 | ERR_R_NESTED_ASN1_ERROR); | 387 | ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, |
| 394 | goto err; | 388 | ERR_R_NESTED_ASN1_ERROR); |
| 389 | goto err; | ||
| 390 | } | ||
| 391 | } else { | ||
| 392 | memset(*pval, 0, it->size); | ||
| 395 | } | 393 | } |
| 396 | 394 | ||
| 397 | if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) | 395 | if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL)) |
