diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_new.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_new.c b/src/lib/libcrypto/asn1/tasn_new.c index cbc6bfc1d5..86b2b3facd 100644 --- a/src/lib/libcrypto/asn1/tasn_new.c +++ b/src/lib/libcrypto/asn1/tasn_new.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tasn_new.c,v 1.12 2015/02/14 13:32:46 jsing Exp $ */ | 1 | /* $OpenBSD: tasn_new.c,v 1.13 2015/02/14 15:15:27 miod 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 | */ |
@@ -351,7 +351,8 @@ ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it) | |||
351 | 351 | ||
352 | default: | 352 | default: |
353 | str = ASN1_STRING_type_new(utype); | 353 | str = ASN1_STRING_type_new(utype); |
354 | if (it->itype == ASN1_ITYPE_MSTRING && str) | 354 | if (it != NULL && it->itype == ASN1_ITYPE_MSTRING && |
355 | str != NULL) | ||
355 | str->flags |= ASN1_STRING_FLAG_MSTRING; | 356 | str->flags |= ASN1_STRING_FLAG_MSTRING; |
356 | *pval = (ASN1_VALUE *)str; | 357 | *pval = (ASN1_VALUE *)str; |
357 | break; | 358 | break; |