Fix NETSCAPE_SPKI_print function to not assume NUL terminated strings
authorMatt Caswell <matt@openssl.org>
Thu, 19 Aug 2021 11:23:38 +0000 (12:23 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 24 Aug 2021 13:22:06 +0000 (14:22 +0100)
commit7c038a6bcd98d4bbfd2c2892a87a1138d2f7c5f3
treebab3e1f2e9675475ba49eff5f1ea6db903fabf09
parent98624776c4d501c8badd6f772ab7048ac9191cb9
Fix NETSCAPE_SPKI_print function to not assume NUL terminated strings

ASN.1 strings may not be NUL terminated. Don't assume they are.

CVE-2021-3712

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: David Benjamin <davidben@google.com>
crypto/asn1/t_spki.c