Fix test code to not assume NUL terminated strings
authorMatt Caswell <matt@openssl.org>
Wed, 18 Aug 2021 16:37:41 +0000 (17:37 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 24 Aug 2021 13:22:06 +0000 (14:22 +0100)
commit1f365708a3318a5f1a395f90c38b584a58d37fb9
tree63f8f2b9cbe96056c3f136621de4d3097bd6d049
parent95f8c1e142df835d03b5b62521383a462fc5470d
Fix test code 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>
test/cmp_status_test.c
test/helpers/pkcs12.c
test/x509_time_test.c