From 18295f0c2db084fe00d935d8506d6e964f652d21 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 14 Feb 2016 13:02:15 +0100 Subject: 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 --- apps/ocsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/ocsp.c') diff --git a/apps/ocsp.c b/apps/ocsp.c index 73b407c986..f9ba4e158a 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -1065,7 +1065,7 @@ static int urldecode(char *p) for (; *p; p++) { if (*p != '%') *out++ = *p; - else if (isxdigit(p[1]) && isxdigit(p[2])) { + else if (isxdigit(_UC(p[1])) && isxdigit(_UC(p[2]))) { *out++ = (app_hex(p[1]) << 4) | app_hex(p[2]); p += 2; } -- cgit v1.2.3