diff options
author | 2018-03-22 15:54:46 +0000 | |
---|---|---|
committer | 2018-03-22 15:54:46 +0000 | |
commit | e98034359a28cb45faf8decab4961925e96461ab (patch) | |
tree | 2247e8dc20274cc706c16b7eecca6b69f28bee7f | |
parent | In vldcp(4), initialize lc_rx_state to a magic value which is not (diff) | |
download | wireguard-openbsd-e98034359a28cb45faf8decab4961925e96461ab.tar.xz wireguard-openbsd-e98034359a28cb45faf8decab4961925e96461ab.zip |
Call strlen() if name length provided is 0, like OpenSSL does.
Issue notice by Christian Heimes <christian@python.org>
ok deraadt@ jsing@
-rw-r--r-- | lib/libcrypto/x509/x509_vpm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libcrypto/x509/x509_vpm.c b/lib/libcrypto/x509/x509_vpm.c index e0111d2f174..0897137697a 100644 --- a/lib/libcrypto/x509/x509_vpm.c +++ b/lib/libcrypto/x509/x509_vpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vpm.c,v 1.16 2017/12/09 07:09:25 deraadt Exp $ */ +/* $OpenBSD: x509_vpm.c,v 1.17 2018/03/22 15:54:46 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2004. */ @@ -130,6 +130,8 @@ int_x509_param_set_hosts(X509_VERIFY_PARAM_ID *id, int mode, { char *copy; + if (name != NULL && namelen == 0) + namelen = strlen(name); /* * Refuse names with embedded NUL bytes. * XXX: Do we need to push an error onto the error stack? |