Commit fdb2306a authored by Damien Miller's avatar Damien Miller

- 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
parent e0016730
......@@ -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
......
/* $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>
......
/* $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 */
......
/* $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;
......
/* $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)
......
/* $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';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment