summaryrefslogtreecommitdiffstats
path: root/usr.sbin/amd/amd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/amd/amd')
-rw-r--r--usr.sbin/amd/amd/amq_subr.c8
-rw-r--r--usr.sbin/amd/amd/info_file.c13
-rw-r--r--usr.sbin/amd/amd/mount_fs.c4
-rw-r--r--usr.sbin/amd/amd/util.c10
4 files changed, 23 insertions, 12 deletions
diff --git a/usr.sbin/amd/amd/amq_subr.c b/usr.sbin/amd/amd/amq_subr.c
index 77d95e10daf..32db57943bd 100644
--- a/usr.sbin/amd/amd/amq_subr.c
+++ b/usr.sbin/amd/amd/amq_subr.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)amq_subr.c 8.1 (Berkeley) 6/6/93
- * $Id: amq_subr.c,v 1.12 2007/03/20 04:00:32 tedu Exp $
+ * $Id: amq_subr.c,v 1.13 2013/12/03 02:14:57 deraadt Exp $
*/
/*
@@ -202,7 +202,9 @@ struct svc_req *rqstp;
/*
* Find end of key
*/
- for (cp = (char *) s; *cp&&(!isascii(*cp)||!isspace(*cp)); cp++)
+ for (cp = (char *) s;
+ *cp&&(!isascii((unsigned char)*cp) || !isspace((unsigned char)*cp));
+ cp++)
;
if (!*cp) {
@@ -215,7 +217,7 @@ struct svc_req *rqstp;
/*
* Find start of value
*/
- while (isascii(*cp) && isspace(*cp))
+ while (isascii((unsigned char)*cp) && isspace((unsigned char)*cp))
cp++;
root_newmap(s, cp, (char *) 0);
diff --git a/usr.sbin/amd/amd/info_file.c b/usr.sbin/amd/amd/info_file.c
index 87f310bbded..21e29d41429 100644
--- a/usr.sbin/amd/amd/info_file.c
+++ b/usr.sbin/amd/amd/info_file.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)info_file.c 8.1 (Berkeley) 6/6/93
- * $Id: info_file.c,v 1.6 2007/03/20 04:00:32 tedu Exp $
+ * $Id: info_file.c,v 1.7 2013/12/03 02:14:57 deraadt Exp $
*/
/*
@@ -119,7 +119,9 @@ search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m,
/*
* Find start of key
*/
- for (kp = key_val; isascii(*kp) && isspace(*kp); kp++)
+ for (kp = key_val;
+ isascii((unsigned char)*kp) && isspace((unsigned char)*kp);
+ kp++)
;
/*
@@ -131,7 +133,9 @@ search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m,
/*
* Find end of key
*/
- for (cp = kp; *cp&&(!isascii(*cp)||!isspace(*cp)); cp++)
+ for (cp = kp; *cp &&
+ (!isascii((unsigned char)*cp) || !isspace((unsigned char)*cp));
+ cp++)
;
/*
@@ -141,7 +145,8 @@ search_or_reload_file(FILE *fp, char *map, char *key, char **val, mnt_map *m,
*cp++ = '\0';
if (fn || (*key == *kp && strcmp(key, kp) == 0)) {
- while (isascii(*cp) && isspace(*cp))
+ while (isascii((unsigned char)*cp) &&
+ isspace((unsigned char)*cp))
cp++;
if (*cp) {
/*
diff --git a/usr.sbin/amd/amd/mount_fs.c b/usr.sbin/amd/amd/mount_fs.c
index 08bc14fb23e..56644efdd31 100644
--- a/usr.sbin/amd/amd/mount_fs.c
+++ b/usr.sbin/amd/amd/mount_fs.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)mount_fs.c 8.1 (Berkeley) 6/6/93
- * $Id: mount_fs.c,v 1.10 2007/03/20 04:00:32 tedu Exp $
+ * $Id: mount_fs.c,v 1.11 2013/12/03 02:14:57 deraadt Exp $
*/
#include "am.h"
@@ -217,7 +217,7 @@ nextmntopt(char **p)
/*
* Skip past white space
*/
- while (isspace(*cp))
+ while (isspace((unsigned char)*cp))
cp++;
/*
* Word starts here
diff --git a/usr.sbin/amd/amd/util.c b/usr.sbin/amd/amd/util.c
index a1d4a78e24e..ed9e5e25471 100644
--- a/usr.sbin/amd/amd/util.c
+++ b/usr.sbin/amd/amd/util.c
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: @(#)util.c 8.1 (Berkeley) 6/6/93
- * $Id: util.c,v 1.11 2003/06/02 23:36:51 millert Exp $
+ * $Id: util.c,v 1.12 2013/12/03 02:14:57 deraadt Exp $
*/
/*
@@ -102,7 +102,9 @@ strsplit(char *s, int ch, int qc)
/*
* skip to split char
*/
- while (*s && (ch == ' ' ? (isascii(*s) && isspace(*s)) : *s == ch))
+ while (*s && (ch == ' ' ?
+ (isascii((unsigned char)*s) && isspace((unsigned char)*s)) :
+ *s == ch))
*s++ = '\0';
/*
@@ -119,7 +121,9 @@ strsplit(char *s, int ch, int qc)
/*
* skip to split char
*/
- while (*s && !(ch == ' ' ? (isascii(*s) && isspace(*s)) : *s == ch)) {
+ while (*s && !(ch == ' ' ?
+ (isascii((unsigned char)*s) && isspace((unsigned char)*s)) :
+ *s == ch)) {
if (*s++ == qc) {
/*
* Skip past string.