diff options
author | Damien Miller <djm@mindrot.org> | 2006-03-26 14:09:54 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2006-03-26 14:09:54 +1100 |
commit | 1d2b6706ba1b2000bd807731e6d8e35691eaf8df (patch) | |
tree | b61365d7696fe908a14fd643362e3728e71846a3 | |
parent | 1ff7c642eed4df1c2f9fcc6f247d7d9949b6e81c (diff) |
- deraadt@cvs.openbsd.org 2006/03/20 18:42:27
[canohost.c match.c ssh.c sshconnect.c]
be strict with tolower() casting
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | canohost.c | 2 | ||||
-rw-r--r-- | match.c | 2 | ||||
-rw-r--r-- | ssh.c | 2 | ||||
-rw-r--r-- | sshconnect.c | 2 |
5 files changed, 8 insertions, 5 deletions
@@ -95,6 +95,9 @@ | |||
95 | - deraadt@cvs.openbsd.org 2006/03/20 18:41:43 | 95 | - deraadt@cvs.openbsd.org 2006/03/20 18:41:43 |
96 | [dns.c] | 96 | [dns.c] |
97 | cast xstrdup to propert u_char * | 97 | cast xstrdup to propert u_char * |
98 | - deraadt@cvs.openbsd.org 2006/03/20 18:42:27 | ||
99 | [canohost.c match.c ssh.c sshconnect.c] | ||
100 | be strict with tolower() casting | ||
98 | 101 | ||
99 | 20060325 | 102 | 20060325 |
100 | - OpenBSD CVS Sync | 103 | - OpenBSD CVS Sync |
@@ -4352,4 +4355,4 @@ | |||
4352 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 4355 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
4353 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 4356 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
4354 | 4357 | ||
4355 | $Id: ChangeLog,v 1.4269 2006/03/26 03:09:09 djm Exp $ | 4358 | $Id: ChangeLog,v 1.4270 2006/03/26 03:09:54 djm Exp $ |
diff --git a/canohost.c b/canohost.c index 4fafb0b82..b1c35e99e 100644 --- a/canohost.c +++ b/canohost.c | |||
@@ -88,7 +88,7 @@ get_remote_hostname(int sock, int use_dns) | |||
88 | */ | 88 | */ |
89 | for (i = 0; name[i]; i++) | 89 | for (i = 0; name[i]; i++) |
90 | if (isupper(name[i])) | 90 | if (isupper(name[i])) |
91 | name[i] = tolower(name[i]); | 91 | name[i] = (char)tolower(name[i]); |
92 | /* | 92 | /* |
93 | * Map it back to an IP address and check that the given | 93 | * Map it back to an IP address and check that the given |
94 | * address actually is an address of this host. This is | 94 | * address actually is an address of this host. This is |
@@ -137,7 +137,7 @@ match_pattern_list(const char *string, const char *pattern, u_int len, | |||
137 | i < len && subi < sizeof(sub) - 1 && pattern[i] != ','; | 137 | i < len && subi < sizeof(sub) - 1 && pattern[i] != ','; |
138 | subi++, i++) | 138 | subi++, i++) |
139 | sub[subi] = dolower && isupper(pattern[i]) ? | 139 | sub[subi] = dolower && isupper(pattern[i]) ? |
140 | tolower(pattern[i]) : pattern[i]; | 140 | (char)tolower(pattern[i]) : pattern[i]; |
141 | /* If subpattern too long, return failure (no match). */ | 141 | /* If subpattern too long, return failure (no match). */ |
142 | if (subi >= sizeof(sub) - 1) | 142 | if (subi >= sizeof(sub) - 1) |
143 | return 0; | 143 | return 0; |
@@ -629,7 +629,7 @@ main(int ac, char **av) | |||
629 | if (options.host_key_alias != NULL) { | 629 | if (options.host_key_alias != NULL) { |
630 | for (p = options.host_key_alias; *p; p++) | 630 | for (p = options.host_key_alias; *p; p++) |
631 | if (isupper(*p)) | 631 | if (isupper(*p)) |
632 | *p = tolower(*p); | 632 | *p = (char)tolower(*p); |
633 | } | 633 | } |
634 | 634 | ||
635 | /* Get default port if port has not been set. */ | 635 | /* Get default port if port has not been set. */ |
diff --git a/sshconnect.c b/sshconnect.c index 53b5200ff..33961e4dc 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -927,7 +927,7 @@ ssh_login(Sensitive *sensitive, const char *orighost, | |||
927 | host = xstrdup(orighost); | 927 | host = xstrdup(orighost); |
928 | for (cp = host; *cp; cp++) | 928 | for (cp = host; *cp; cp++) |
929 | if (isupper(*cp)) | 929 | if (isupper(*cp)) |
930 | *cp = tolower(*cp); | 930 | *cp = (char)tolower(*cp); |
931 | 931 | ||
932 | /* Exchange protocol version identification strings with the server. */ | 932 | /* Exchange protocol version identification strings with the server. */ |
933 | ssh_exchange_identification(); | 933 | ssh_exchange_identification(); |