diff options
author | Richard Levitte <levitte@openssl.org> | 2016-02-14 13:02:15 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-02-14 19:31:55 +0100 |
commit | 18295f0c2db084fe00d935d8506d6e964f652d21 (patch) | |
tree | 81e661fc1e2052c698b5daee8aae711e574bc0e4 /apps/apps.c | |
parent | ef8ca6bd544e4baea67f9a193ae896b8629944d0 (diff) | |
download | openssl-18295f0c2db084fe00d935d8506d6e964f652d21.tar.gz |
Make sure to use unsigned char for is*() functions
On some platforms, the implementation is such that a signed char
triggers a warning when used with is*() functions. On others, the
behavior is outright buggy when presented with a char that happens
to get promoted to a negative integer.
The safest thing is to cast the char that's used to an unsigned char.
Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'apps/apps.c')
-rw-r--r-- | apps/apps.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/apps.c b/apps/apps.c index 7a4608f75c..2a189f20a0 100644 --- a/apps/apps.c +++ b/apps/apps.c @@ -183,7 +183,7 @@ int chopup_args(ARGS *arg, char *buf) for (p = buf;;) { /* Skip whitespace. */ - while (*p && isspace(*p)) + while (*p && isspace(_UC(*p))) p++; if (!*p) break; @@ -207,7 +207,7 @@ int chopup_args(ARGS *arg, char *buf) p++; *p++ = '\0'; } else { - while (*p && !isspace(*p)) + while (*p && !isspace(_UC(*p))) p++; if (*p) *p++ = '\0'; |