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.
This commit is contained in:
@@ -75,7 +75,7 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
|
||||
}
|
||||
|
||||
/* skip initial whitespaces */
|
||||
while(*header && isspace((int)*header))
|
||||
while(*header && ISSPACE(*header))
|
||||
header++;
|
||||
|
||||
if(checkprefix("Digest", header)) {
|
||||
@@ -93,7 +93,7 @@ CURLdigest Curl_input_digest(struct connectdata *conn,
|
||||
char content[128];
|
||||
size_t totlen=0;
|
||||
|
||||
while(*header && isspace((int)*header))
|
||||
while(*header && ISSPACE(*header))
|
||||
header++;
|
||||
|
||||
/* how big can these strings be? */
|
||||
|
||||
Reference in New Issue
Block a user