From 53cc2fa3736fd191fbf3b2e2795d140744d97fc7 Mon Sep 17 00:00:00 2001 From: liubo Date: Mon, 8 Apr 2024 09:54:38 +0800 Subject: [PATCH] =?UTF-8?q?Description:=20cJSON=5FSetValuestring=E5=85=A5?= =?UTF-8?q?=E5=8F=82=E5=A2=9E=E5=8A=A0=E5=88=A4=E7=A9=BA=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E8=B0=83=E7=94=A8=E5=AF=BC=E8=87=B4=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=20IssueNo:https://gitee.com/openharmony/third=5Fparty?= =?UTF-8?q?=5FcJSON/issues/I9EP9J=20Feature=20or=20Bugfix:=20Bugfix=20Bina?= =?UTF-8?q?ry=20Source:No=20Signed-off-by:=20liubo419=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 8411d94..a7379df 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