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:
@@ -3252,7 +3252,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
||||
/* detect and extract RFC2732-style IPv6-addresses */
|
||||
if(*proxyptr == '[') {
|
||||
char *ptr = ++proxyptr; /* advance beyond the initial bracket */
|
||||
while(*ptr && (isxdigit((int)*ptr) || (*ptr == ':')))
|
||||
while(*ptr && (ISXDIGIT(*ptr) || (*ptr == ':')))
|
||||
ptr++;
|
||||
if(*ptr == ']') {
|
||||
/* yeps, it ended nicely with a bracket as well */
|
||||
|
Reference in New Issue
Block a user