[openssl] OpenSSL_1_1_1-stable update
bernd.edlinger at hotmail.de
bernd.edlinger at hotmail.de
Tue Jul 2 14:24:27 UTC 2019
The branch OpenSSL_1_1_1-stable has been updated
via 261ec72d58af64327214a78ca1c54b169ad93c28 (commit)
from 3003d2dba996d16e47c8bc70a23c70b3d394fb7c (commit)
- Log -----------------------------------------------------------------
commit 261ec72d58af64327214a78ca1c54b169ad93c28
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date: Mon Jul 1 09:06:02 2019 +0200
Fix ASN1_TYPE_get/set with type=V_ASN1_BOOLEAN
BOOLEAN does not have valid data in the value.ptr member,
thus don't use it here.
Fixes #9276
[extended tests]
Reviewed-by: Matt Caswell <matt at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9278)
(cherry picked from commit 6335f837cfa7eaf1202f2557bf2ba148987226e7)
-----------------------------------------------------------------------
Summary of changes:
crypto/asn1/a_type.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/crypto/asn1/a_type.c b/crypto/asn1/a_type.c
index 0c7aebe..84e78df 100644
--- a/crypto/asn1/a_type.c
+++ b/crypto/asn1/a_type.c
@@ -15,7 +15,9 @@
int ASN1_TYPE_get(const ASN1_TYPE *a)
{
- if ((a->value.ptr != NULL) || (a->type == V_ASN1_NULL))
+ if (a->type == V_ASN1_BOOLEAN
+ || a->type == V_ASN1_NULL
+ || a->value.ptr != NULL)
return a->type;
else
return 0;
@@ -23,7 +25,9 @@ int ASN1_TYPE_get(const ASN1_TYPE *a)
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value)
{
- if (a->value.ptr != NULL) {
+ if (a->type != V_ASN1_BOOLEAN
+ && a->type != V_ASN1_NULL
+ && a->value.ptr != NULL) {
ASN1_TYPE **tmp_a = &a;
asn1_primitive_free((ASN1_VALUE **)tmp_a, NULL, 0);
}
More information about the openssl-commits
mailing list