Allow fuzz builds to detect string overruns
authorMatt Caswell <matt@openssl.org>
Thu, 19 Aug 2021 14:25:04 +0000 (15:25 +0100)
committerMatt Caswell <matt@openssl.org>
Tue, 24 Aug 2021 13:22:07 +0000 (14:22 +0100)
commite20fc2ee4fc90ac1476b3a9b15b37542bfb1af73
treecbfb33fe9e1cf77630baf8fac30ea504e0895d42
parent030c5aba94788f152f9ceef3549815df45bef702
Allow fuzz builds to detect string overruns

If FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION is defined then we don't NUL
terminate ASN1_STRING datatypes. This shouldn't be necessary but we add it
any for safety in normal builds.

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