From 0e1ae8aeea9b5df14599a4da00db87be835946f3 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Fri, 27 Apr 2018 14:19:45 +0300 Subject: [PATCH] Fixed incorrect pointer check in njs_json_parse_string(). Found by Coverity (CID 1435161, 1435162). The bug appeared in 29eee021e03e. --- njs/njs_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/njs/njs_json.c b/njs/njs_json.c index 71c9b7a0..24d585ba 100644 --- a/njs/njs_json.c +++ b/njs/njs_json.c @@ -741,7 +741,7 @@ njs_json_parse_string(njs_json_parse_ctx_t *ctx, njs_value_t *value, p = start; dst = nxt_mem_cache_alloc(ctx->pool, size); - if (nxt_slow_path(start == NULL)) { + if (nxt_slow_path(dst == NULL)) { njs_memory_error(ctx->vm);; return NULL; } -- 2.47.3