summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-06-27 10:09:50 +0000
committerache <ache@FreeBSD.org>1997-06-27 10:09:50 +0000
commitca7a3500533bf51c3d936b7bc489f63ab63bbcce (patch)
tree3fb9e502de08ab47665f894c96fbafac397306f2 /usr.bin
parent13eedc9f63d4ebd42be815c6bfa90ff869ea19c5 (diff)
downloadFreeBSD-src-ca7a3500533bf51c3d936b7bc489f63ab63bbcce.zip
FreeBSD-src-ca7a3500533bf51c3d936b7bc489f63ab63bbcce.tar.gz
Protect isspace by isascii to not count high spaces
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ftp/domacro.c6
-rw-r--r--usr.bin/ftp/ruserpass.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/ftp/domacro.c b/usr.bin/ftp/domacro.c
index 3c058ca..a28d068 100644
--- a/usr.bin/ftp/domacro.c
+++ b/usr.bin/ftp/domacro.c
@@ -1,4 +1,4 @@
-/* $Id: domacro.c,v 1.2 1997/06/25 08:56:37 msmith Exp $ */
+/* $Id: domacro.c,v 1.3 1997/06/27 09:30:09 ache Exp $ */
/* $NetBSD: domacro.c,v 1.9 1997/03/13 06:23:14 lukem Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)domacro.c 8.3 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$Id: domacro.c,v 1.2 1997/06/25 08:56:37 msmith Exp $";
+static char rcsid[] = "$Id: domacro.c,v 1.3 1997/06/27 09:30:09 ache Exp $";
#endif
#endif /* not lint */
@@ -77,7 +77,7 @@ domacro(argc, argv)
TOP:
cp1 = macros[i].mac_start;
while (cp1 != macros[i].mac_end) {
- while (isspace((unsigned char)*cp1)) {
+ while (isascii(*cp1) && isspace(*cp1)) {
cp1++;
}
cp2 = line;
diff --git a/usr.bin/ftp/ruserpass.c b/usr.bin/ftp/ruserpass.c
index 315cd79..35302a0 100644
--- a/usr.bin/ftp/ruserpass.c
+++ b/usr.bin/ftp/ruserpass.c
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: ruserpass.c,v 1.5 1997/06/25 08:56:45 msmith Exp $ */
/* $NetBSD: ruserpass.c,v 1.13 1997/04/01 14:20:34 mrg Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95";
#else
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: ruserpass.c,v 1.5 1997/06/25 08:56:45 msmith Exp $";
#endif
#endif /* not lint */
@@ -202,7 +202,7 @@ next:
tmp = macros[macnum].mac_name;
*tmp++ = c;
for (i=0; i < 8 && (c=getc(cfile)) != EOF &&
- !isspace(c); ++i) {
+ (!isascii(c) || !isspace(c)); ++i) {
*tmp++ = c;
}
if (c == EOF) {
OpenPOWER on IntegriCloud