aboutsummaryrefslogtreecommitdiffstats
path: root/apps/s_server.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-02-14 13:02:15 +0100
committerRichard Levitte <levitte@openssl.org>2016-02-14 19:31:55 +0100
commit18295f0c2db084fe00d935d8506d6e964f652d21 (patch)
tree81e661fc1e2052c698b5daee8aae711e574bc0e4 /apps/s_server.c
parentef8ca6bd544e4baea67f9a193ae896b8629944d0 (diff)
downloadopenssl-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/s_server.c')
-rw-r--r--apps/s_server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/s_server.c b/apps/s_server.c
index 489924ced6..38030364bd 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -1380,7 +1380,7 @@ int s_server_main(int argc, char *argv[])
case OPT_PSK:
#ifndef OPENSSL_NO_PSK
for (p = psk_key = opt_arg(); *p; p++) {
- if (isxdigit(*p))
+ if (isxdigit(_UC(*p)))
continue;
BIO_printf(bio_err, "Not a hex number '%s'\n", *argv);
goto end;