summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/tasn_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_new.c')
-rw-r--r--src/lib/libcrypto/asn1/tasn_new.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_new.c b/src/lib/libcrypto/asn1/tasn_new.c
index e33861f864..a0e3db574f 100644
--- a/src/lib/libcrypto/asn1/tasn_new.c
+++ b/src/lib/libcrypto/asn1/tasn_new.c
@@ -305,7 +305,10 @@ int ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it)
305 return 1; 305 return 1;
306 306
307 case V_ASN1_BOOLEAN: 307 case V_ASN1_BOOLEAN:
308 *(ASN1_BOOLEAN *)pval = it->size; 308 if (it)
309 *(ASN1_BOOLEAN *)pval = it->size;
310 else
311 *(ASN1_BOOLEAN *)pval = -1;
309 return 1; 312 return 1;
310 313
311 case V_ASN1_NULL: 314 case V_ASN1_NULL: