diff options
author | nectar <nectar@FreeBSD.org> | 2003-10-01 12:32:41 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2003-10-01 12:32:41 +0000 |
commit | ee25ce74b3f6742c1079590363995e56ff51b014 (patch) | |
tree | 69b3ffc611270d72c473248fe700c2942eb5e6b5 /crypto/openssl/ssl/ssl_ciph.c | |
parent | 5d79b842c13e718f85a9f2e1676e361b6fc55367 (diff) | |
download | FreeBSD-src-ee25ce74b3f6742c1079590363995e56ff51b014.zip FreeBSD-src-ee25ce74b3f6742c1079590363995e56ff51b014.tar.gz |
Vendor import of OpenSSL 0.9.7c
Diffstat (limited to 'crypto/openssl/ssl/ssl_ciph.c')
-rw-r--r-- | crypto/openssl/ssl/ssl_ciph.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/openssl/ssl/ssl_ciph.c b/crypto/openssl/ssl/ssl_ciph.c index c72be89..888b667 100644 --- a/crypto/openssl/ssl/ssl_ciph.c +++ b/crypto/openssl/ssl/ssl_ciph.c @@ -668,13 +668,14 @@ static int ssl_cipher_process_rulestr(const char *rule_str, * So additionally check whether the cipher name found * has the correct length. We can save a strlen() call: * just checking for the '\0' at the right place is - * sufficient, we have to strncmp() anyway. + * sufficient, we have to strncmp() anyway. (We cannot + * use strcmp(), because buf is not '\0' terminated.) */ j = found = 0; while (ca_list[j]) { - if ((ca_list[j]->name[buflen] == '\0') && - !strncmp(buf, ca_list[j]->name, buflen)) + if (!strncmp(buf, ca_list[j]->name, buflen) && + (ca_list[j]->name[buflen] == '\0')) { found = 1; break; |