summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libcrypto/asn1/a_type.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/a_type.c b/src/lib/libcrypto/asn1/a_type.c
index 61609c38f7..684321756f 100644
--- a/src/lib/libcrypto/asn1/a_type.c
+++ b/src/lib/libcrypto/asn1/a_type.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_type.c,v 1.23 2021/12/25 12:19:16 jsing Exp $ */ 1/* $OpenBSD: a_type.c,v 1.24 2023/03/10 09:56:09 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -104,10 +104,14 @@ ASN1_TYPE_free(ASN1_TYPE *a)
104int 104int
105ASN1_TYPE_get(const ASN1_TYPE *a) 105ASN1_TYPE_get(const ASN1_TYPE *a)
106{ 106{
107 if ((a->value.ptr != NULL) || (a->type == V_ASN1_NULL)) 107 /* Special non-pointer types. */
108 return (a->type); 108 if (a->type == V_ASN1_BOOLEAN || a->type == V_ASN1_NULL )
109 else 109 return a->type;
110 return (0); 110
111 if (a->value.ptr != NULL)
112 return a->type;
113
114 return 0;
111} 115}
112 116
113void 117void