diff options
| author | Gary Lin <glin@suse.com> | 2016-03-17 14:59:04 +0800 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2016-09-06 15:05:36 -0400 |
| commit | 0297aa3cf34ca3a95a6e95db7aff82020aefa0e5 (patch) | |
| tree | d2b0ff4c76d6df0960782c647a33cb30f7a2ef86 /Cryptlib/OpenSSL/crypto/x509/x509_vpm.c | |
| parent | 7b9281af14930040ec6cb333de2d64e0ff91cf3c (diff) | |
| download | efi-boot-shim-0297aa3cf34ca3a95a6e95db7aff82020aefa0e5.tar.gz efi-boot-shim-0297aa3cf34ca3a95a6e95db7aff82020aefa0e5.zip | |
Update openssl to 1.0.2g
Signed-off-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/x509/x509_vpm.c')
| -rw-r--r-- | Cryptlib/OpenSSL/crypto/x509/x509_vpm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cryptlib/OpenSSL/crypto/x509/x509_vpm.c b/Cryptlib/OpenSSL/crypto/x509/x509_vpm.c index 592a8a5f..1ac15a88 100644 --- a/Cryptlib/OpenSSL/crypto/x509/x509_vpm.c +++ b/Cryptlib/OpenSSL/crypto/x509/x509_vpm.c @@ -94,11 +94,11 @@ static int int_x509_param_set_hosts(X509_VERIFY_PARAM_ID *id, int mode, * Refuse names with embedded NUL bytes, except perhaps as final byte. * XXX: Do we need to push an error onto the error stack? */ - if (namelen == 0) + if (namelen == 0 || name == NULL) namelen = name ? strlen(name) : 0; else if (name && memchr(name, '\0', namelen > 1 ? namelen - 1 : namelen)) return 0; - if (name && name[namelen - 1] == '\0') + if (namelen > 0 && name[namelen - 1] == '\0') --namelen; if (mode == SET_HOST && id->hosts) { |
