diff options
-rw-r--r-- | src/nxt_conf_json.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_conf_json.c b/src/nxt_conf_json.c index 00000002..cea7d880 100644 --- a/src/nxt_conf_json.c +++ b/src/nxt_conf_json.c @@ -613,7 +613,7 @@ nxt_conf_json_parse_value(u_char *pos, u_char *end, return nxt_conf_json_parse_string(pos, end, value, pool); case 't': - if (nxt_fast_path(end - pos >= 4 || nxt_memcmp(pos, "true", 4) == 0)) { + if (nxt_fast_path(end - pos >= 4 && nxt_memcmp(pos, "true", 4) == 0)) { value->u.boolean = 1; value->type = NXT_CONF_JSON_BOOLEAN; @@ -623,7 +623,7 @@ nxt_conf_json_parse_value(u_char *pos, u_char *end, return NULL; case 'f': - if (nxt_fast_path(end - pos >= 5 || nxt_memcmp(pos, "false", 5) == 0)) { + if (nxt_fast_path(end - pos >= 5 && nxt_memcmp(pos, "false", 5) == 0)) { value->u.boolean = 0; value->type = NXT_CONF_JSON_BOOLEAN; @@ -633,7 +633,7 @@ nxt_conf_json_parse_value(u_char *pos, u_char *end, return NULL; case 'n': - if (nxt_fast_path(end - pos >= 4 || nxt_memcmp(pos, "null", 4) == 0)) { + if (nxt_fast_path(end - pos >= 4 && nxt_memcmp(pos, "null", 4) == 0)) { value->type = NXT_CONF_JSON_NULL; return pos + 4; } |