We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First, the function:
cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item) { cJSON_AddItemToObjectCS(object, (char*)cJSON_strdup((const unsigned char*)string, &global_hooks), item) item->type &= ~cJSON_StringIsConst; }
In cJSON_AddItemToObjectCS we see:
if (!item) { return; }
So that would be fine, but then, cJSON_AddItemToObject references a field from item, which, as we know, is a NULL.
The text was updated successfully, but these errors were encountered:
Yes, cJSON_AddItemToObject should also check if the item is a NULL pointer.
cJSON_AddItemToObject
NULL
Sorry, something went wrong.
Fixed in version 1.5.6
No branches or pull requests
First, the function:
In cJSON_AddItemToObjectCS we see:
So that would be fine, but then, cJSON_AddItemToObject references a field from item, which, as we know, is a NULL.
The text was updated successfully, but these errors were encountered: