From 3a63563fd6c13442f9fbeda970f8c9a8629f7db6 Mon Sep 17 00:00:00 2001 From: "mk5004.lee" Date: Wed, 14 Mar 2018 11:36:00 +0900 Subject: [PATCH] Check return value Change-Id: I29be7cf904e13762cb799aabbb2d89b215c1fc47 Signed-off-by: mk5004.lee --- src/bundle_json.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bundle_json.c b/src/bundle_json.c index 3f11e3b..8dad013 100644 --- a/src/bundle_json.c +++ b/src/bundle_json.c @@ -136,6 +136,9 @@ static void __add_bundle_data_from_json(JsonObject *object, node_type = JSON_NODE_TYPE(node); if (node_type == JSON_NODE_ARRAY) { json_arr = json_node_get_array(node); + if (json_arr == NULL) + return; + len = json_array_get_length(json_arr); arr_val = (char **)calloc(1, sizeof(char *) * len); -- 2.7.4