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:
Eric Haszlakiewicz
2018-03-25 18:25:58 -04:00
parent da4b34355d
commit f8c632f579
3 changed files with 4 additions and 4 deletions

View File

@@ -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;
}