Issue #407: fix incorrect casts in calls to ctype functions (isdigit and isspace) so we don't crash when asserts are enabled on certain platforms and characters > 128 are parsed.
This commit is contained in:
@@ -295,7 +295,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
|
||||
|
||||
case json_tokener_state_eatws:
|
||||
/* Advance until we change state */
|
||||
while (isspace((int)c)) {
|
||||
while (isspace((unsigned char)c)) {
|
||||
if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok)))
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user