aboutsummaryrefslogtreecommitdiff
path: root/lib/http_negotiate.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-10-17 21:32:56 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-10-17 21:32:56 +0000
commit44d84ac1646cf04ccc2c1a736f3c9d1644ccacec (patch)
tree78c8960a291ba0a11548ab34e88a9a7b1bbcee3f /lib/http_negotiate.c
parent930f9bd5342e6d514f9ba5b1303762c100621965 (diff)
Avoid typecasting a signed char to an int when using is*() functions, as that
could very well cause a negate number get passed in and thus cause reading outside of the array usually used for this purpose. We avoid this by using the uppercase macro versions introduced just now that does some extra crazy typecasts to avoid byte codes > 127 to cause negative int values.
Diffstat (limited to 'lib/http_negotiate.c')
-rw-r--r--lib/http_negotiate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
index 70062f85a..eb5bd92d1 100644
--- a/lib/http_negotiate.c
+++ b/lib/http_negotiate.c
@@ -124,7 +124,7 @@ int Curl_input_negotiate(struct connectdata *conn, char *header)
bool gss;
const char* protocol;
- while(*header && isspace((int)*header))
+ while(*header && ISSPACE(*header))
header++;
if(checkprefix("GSS-Negotiate", header)) {
protocol = "GSS-Negotiate";
@@ -160,7 +160,7 @@ int Curl_input_negotiate(struct connectdata *conn, char *header)
return ret;
header += strlen(neg_ctx->protocol);
- while(*header && isspace((int)*header))
+ while(*header && ISSPACE(*header))
header++;
len = strlen(header);