From d20093519879b3069e22959774d1b7ed08db4815 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Wed, 10 Jan 2018 15:54:09 +0100 Subject: [PATCH] stratum: null ptr check on json arrays --- stratum/json.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stratum/json.cpp b/stratum/json.cpp index ca70ef7..3ceba40 100644 --- a/stratum/json.cpp +++ b/stratum/json.cpp @@ -503,7 +503,7 @@ json_value * json_parse_ex (json_settings * settings, case ']': - if (top->type == json_array) + if (top && top->type == json_array) flags = (flags & ~ (flag_need_comma | flag_seek_value)) | flag_next; else { sprintf (error, "%d:%d: Unexpected ]", cur_line, e_off);