diff --git a/cJSON_Utils.c b/cJSON_Utils.c index 71f3d84..02eadfc 100644 --- a/cJSON_Utils.c +++ b/cJSON_Utils.c @@ -208,6 +208,11 @@ cJSON *cJSONUtils_GetPointer(cJSON *object, const char *pointer) static void cJSONUtils_InplaceDecodePointerString(char *string) { char *s2 = string; + + if (string == NULL) { + return; + } + for (; *string; s2++, string++) { *s2 = (*string != '~')