summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2013-11-21 13:57:15 +1100
committerDamien Miller <djm@mindrot.org>2013-11-21 13:57:15 +1100
commitfdb2306acdc3eb2bc46b6dfdaaf6005c650af22a (patch)
treee74555afa79597355921b5e6ce9ba4ae901b5253
parente00167307e4d3692695441e9bd712f25950cb894 (diff)
- deraadt@cvs.openbsd.org 2013/11/20 20:54:10
[canohost.c clientloop.c match.c readconf.c sftp.c] unsigned casts for ctype macros where neccessary ok guenther millert markus
-rw-r--r--ChangeLog4
-rw-r--r--canohost.c3
-rw-r--r--clientloop.c8
-rw-r--r--match.c6
-rw-r--r--readconf.c4
-rw-r--r--sftp.c4
6 files changed, 16 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 253e0227..cb4dae30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,10 @@
[scp.c]
unsigned casts for ctype macros where neccessary
ok guenther millert markus
+ - deraadt@cvs.openbsd.org 2013/11/20 20:54:10
+ [canohost.c clientloop.c match.c readconf.c sftp.c]
+ unsigned casts for ctype macros where neccessary
+ ok guenther millert markus
20131110
- (dtucker) [regress/keytype.sh] Populate ECDSA key types to be tested by
diff --git a/canohost.c b/canohost.c
index a8eeb0e3..2e5a0b86 100644
--- a/canohost.c
+++ b/canohost.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: canohost.c,v 1.68 2013/10/14 23:28:22 djm Exp $ */
+/* $OpenBSD: canohost.c,v 1.69 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -20,7 +20,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
diff --git a/clientloop.c b/clientloop.c
index 8ad5d06b..f30c8b6b 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.255 2013/11/08 00:39:15 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.256 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -289,7 +289,7 @@ client_x11_display_valid(const char *display)
dlen = strlen(display);
for (i = 0; i < dlen; i++) {
- if (!isalnum(display[i]) &&
+ if (!isalnum((u_char)display[i]) &&
strchr(SSH_X11_VALID_DISPLAY_CHARS, display[i]) == NULL) {
debug("Invalid character '%c' in DISPLAY", display[i]);
return 0;
@@ -884,7 +884,7 @@ process_cmdline(void)
cmd = s = read_passphrase("\r\nssh> ", RP_ECHO);
if (s == NULL)
goto out;
- while (isspace(*s))
+ while (isspace((u_char)*s))
s++;
if (*s == '-')
s++; /* Skip cmdline '-', if any */
@@ -938,7 +938,7 @@ process_cmdline(void)
goto out;
}
- while (isspace(*++s))
+ while (isspace((u_char)*++s))
;
/* XXX update list of forwards in options */
diff --git a/match.c b/match.c
index 7be7d2c5..c35e3289 100644
--- a/match.c
+++ b/match.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: match.c,v 1.28 2013/05/17 00:13:13 djm Exp $ */
+/* $OpenBSD: match.c,v 1.29 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -141,8 +141,8 @@ match_pattern_list(const char *string, const char *pattern, u_int len,
for (subi = 0;
i < len && subi < sizeof(sub) - 1 && pattern[i] != ',';
subi++, i++)
- sub[subi] = dolower && isupper(pattern[i]) ?
- (char)tolower(pattern[i]) : pattern[i];
+ sub[subi] = dolower && isupper((u_char)pattern[i]) ?
+ tolower((u_char)pattern[i]) : pattern[i];
/* If subpattern too long, return failure (no match). */
if (subi >= sizeof(sub) - 1)
return 0;
diff --git a/readconf.c b/readconf.c
index 63c0ba19..0e1030d0 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.213 2013/10/24 00:51:48 dtucker Exp $ */
+/* $OpenBSD: readconf.c,v 1.214 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1753,7 +1753,7 @@ parse_forward(Forward *fwd, const char *fwdspec, int dynamicfwd, int remotefwd)
cp = p = xstrdup(fwdspec);
/* skip leading spaces */
- while (isspace(*cp))
+ while (isspace((u_char)*cp))
cp++;
for (i = 0; i < 4; ++i)
diff --git a/sftp.c b/sftp.c
index abc689e8..ad1f8c84 100644
--- a/sftp.c
+++ b/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.157 2013/10/17 07:35:48 jmc Exp $ */
+/* $OpenBSD: sftp.c,v 1.158 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -1065,7 +1065,7 @@ makeargv(const char *arg, int *argcp, int sloppy, char *lastquote,
error("Too many arguments.");
return NULL;
}
- if (isspace(arg[i])) {
+ if (isspace((unsigned char)arg[i])) {
if (state == MA_UNQUOTED) {
/* Terminate current argument */
argvs[j++] = '\0';