diff options
| author | tedu <> | 2014-07-10 12:24:25 +0000 |
|---|---|---|
| committer | tedu <> | 2014-07-10 12:24:25 +0000 |
| commit | 127e1875b8e530d9127881b8ef9fdf712f22c57b (patch) | |
| tree | db7b38cb9e1e6986e22954bebefd5e5f7c631825 /src/lib/libssl/src | |
| parent | ccef1207ba0271ed19ecd005e1ce6ec7093d7839 (diff) | |
| download | openbsd-127e1875b8e530d9127881b8ef9fdf712f22c57b.tar.gz openbsd-127e1875b8e530d9127881b8ef9fdf712f22c57b.tar.bz2 openbsd-127e1875b8e530d9127881b8ef9fdf712f22c57b.zip | |
make asn1 free safe to call with null pointers of any type.
ok jsing miod
Diffstat (limited to 'src/lib/libssl/src')
| -rw-r--r-- | src/lib/libssl/src/crypto/asn1/tasn_fre.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libssl/src/crypto/asn1/tasn_fre.c b/src/lib/libssl/src/crypto/asn1/tasn_fre.c index 0369bf2339..d8d55a536c 100644 --- a/src/lib/libssl/src/crypto/asn1/tasn_fre.c +++ b/src/lib/libssl/src/crypto/asn1/tasn_fre.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tasn_fre.c,v 1.11 2014/06/12 15:49:27 deraadt Exp $ */ | 1 | /* $OpenBSD: tasn_fre.c,v 1.12 2014/07/10 12:24:25 tedu Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -89,10 +89,9 @@ asn1_item_combine_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int combine) | |||
| 89 | ASN1_aux_cb *asn1_cb; | 89 | ASN1_aux_cb *asn1_cb; |
| 90 | int i; | 90 | int i; |
| 91 | 91 | ||
| 92 | if (!pval) | 92 | if (pval == NULL || *pval == NULL) |
| 93 | return; | ||
| 94 | if ((it->itype != ASN1_ITYPE_PRIMITIVE) && !*pval) | ||
| 95 | return; | 93 | return; |
| 94 | |||
| 96 | if (aux && aux->asn1_cb) | 95 | if (aux && aux->asn1_cb) |
| 97 | asn1_cb = aux->asn1_cb; | 96 | asn1_cb = aux->asn1_cb; |
| 98 | else | 97 | else |
