Browse Source

Merge pull request #646 from pascal-cuoq/fix_645

Cast to unsigned char instead of int when calling tolower (Fixes #645)
tags/json-c-0.15-20200726
Eric Hawicz GitHub 5 years ago
parent
commit
64de4b6e9f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      json_tokener.c

+ 1
- 1
json_tokener.c View File

@@ -430,7 +430,7 @@ struct json_object *json_tokener_parse_ex(struct json_tokener *tok, const char *
{
char inf_char = *str;
if (!(tok->flags & JSON_TOKENER_STRICT))
inf_char = tolower((int)*str);
inf_char = tolower((unsigned char)*str);
if (inf_char != _json_inf_str[tok->st_pos])
{
tok->err = json_tokener_error_parse_unexpected;


Loading…
Cancel
Save