diff options
author | Valentin Bartenev <vbart@nginx.com> | 2017-11-21 18:41:43 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2017-11-21 18:41:43 +0300 |
commit | 89a1c66dd0c396cda30a960e790817d28dc9a2de (patch) | |
tree | b4e0604ffa4e3543d1e86e3bbc0ddfb3fcad60fa /src/nxt_conf.c | |
parent | 6bbed85899d16b063df41ffc2cbf314402ad73e6 (diff) | |
download | unit-89a1c66dd0c396cda30a960e790817d28dc9a2de.tar.gz unit-89a1c66dd0c396cda30a960e790817d28dc9a2de.tar.bz2 |
Fixed crash on invalid JSON number.
Diffstat (limited to 'src/nxt_conf.c')
-rw-r--r-- | src/nxt_conf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_conf.c b/src/nxt_conf.c index d48eade3..872a62af 100644 --- a/src/nxt_conf.c +++ b/src/nxt_conf.c @@ -1052,6 +1052,10 @@ nxt_conf_json_parse_value(nxt_mp_t *mp, nxt_conf_value_t *value, u_char *start, if (nxt_fast_path((ch - '0') <= 9)) { p = nxt_conf_json_parse_number(mp, value, start, end, error); + if (nxt_slow_path(p == NULL)) { + return NULL; + } + if (p == end) { return end; } |