diff options
Diffstat (limited to 'src/nxt_conf_json.c')
-rw-r--r-- | src/nxt_conf_json.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nxt_conf_json.c b/src/nxt_conf_json.c index 5808e5a6..b2b830e0 100644 --- a/src/nxt_conf_json.c +++ b/src/nxt_conf_json.c @@ -169,9 +169,9 @@ nxt_conf_json_object_member_get(nxt_lvlhsh_t *lvlhsh, u_char *name, nxt_conf_json_value_t * -nxt_conf_json_parse(nxt_buf_mem_t *b, nxt_mem_pool_t *pool) +nxt_conf_json_parse(u_char *pos, size_t length, nxt_mem_pool_t *pool) { - u_char *pos, *end; + u_char *end; nxt_conf_json_value_t *value; value = nxt_mem_alloc(pool, sizeof(nxt_conf_json_value_t)); @@ -179,8 +179,7 @@ nxt_conf_json_parse(nxt_buf_mem_t *b, nxt_mem_pool_t *pool) return NULL; } - pos = b->pos; - end = b->free; + end = pos + length; pos = nxt_conf_json_skip_space(pos, end); |