From ccf19c23c03ff0355d5008f73b77a0e22ee8ca8c Mon Sep 17 00:00:00 2001 From: Pauli Date: Tue, 6 Apr 2021 10:23:12 +1000 Subject: [PATCH] Disallow ASN.1 enumerated types to be treated as strings. They are actually integers. Problem reported by: Scott McPeak Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14774) --- crypto/asn1/tasn_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c index 0987c2ece3..00a76cc825 100644 --- a/crypto/asn1/tasn_dec.c +++ b/crypto/asn1/tasn_dec.c @@ -66,7 +66,7 @@ static const unsigned long tag2bit[32] = { /* tags 4- 7 */ B_ASN1_OCTET_STRING, 0, 0, B_ASN1_UNKNOWN, /* tags 8-11 */ - B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, + B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, 0, B_ASN1_UNKNOWN, /* tags 12-15 */ B_ASN1_UTF8STRING, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, /* tags 16-19 */