From e1d30babd25ed5c5c76bb887f125207bd2334b0f Mon Sep 17 00:00:00 2001 From: liubo Date: Mon, 8 Apr 2024 09:54:38 +0800 Subject: [PATCH] =?UTF-8?q?fixed=2053cc2fa=20from=20https://gitee.com/liub?= =?UTF-8?q?o419/third=5Fparty=5FcJSON/pulls/58=20Description:=20cJSON=5FSe?= =?UTF-8?q?tValuestring=E5=85=A5=E5=8F=82=E5=A2=9E=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E7=A9=BA=E9=98=B2=E6=AD=A2=E9=94=99=E8=AF=AF=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=B4=A9=E6=BA=83=20IssueNo:https://gitee.co?= =?UTF-8?q?m/openharmony/third=5Fparty=5FcJSON/issues/I9EP9J=20Feature=20o?= =?UTF-8?q?r=20Bugfix:=20Bugfix=20Binary=20Source:No=20Signed-off-by:=20li?= =?UTF-8?q?ubo419=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cJSON.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cJSON.c b/cJSON.c index 7543078..54e1837 100644 --- a/cJSON.c +++ b/cJSON.c @@ -406,7 +406,7 @@ CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring) return NULL; } /* return NULL if the object is corrupted */ - if (object->valuestring == NULL) + if (object->valuestring == NULL || valuestring == NULL) { return NULL; } -- Gitee