Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add NULL check to cJSON_SetValuestring() #840

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Conversation

Up-wind
Copy link
Contributor

@Up-wind Up-wind commented Mar 25, 2024

If the valuestring passed to cJSON_SetValuestring is NULL, a null pointer dereference will happen.

This commit adds the NULL check of valuestring before it is dereferenced.

fixes: #839

If the valuestring passed to cJSON_SetValuestring is NULL, a null pointer dereference will happen.

This commit adds the NULL check of valuestring before it is dereferenced.
@Alanscut
Copy link
Collaborator

LGTM.

@Alanscut Alanscut merged commit 7e4d5da into DaveGamble:master Apr 26, 2024
@Alanscut Alanscut mentioned this pull request Apr 28, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A segmentation fault in cJSON_SetValuestring
2 participants