Skip to content

Add NULL check to cJSON_SetValuestring()#840

Merged
Alanscut merged 1 commit into
DaveGamble:masterfrom
Up-wind:master
Apr 26, 2024
Merged

Add NULL check to cJSON_SetValuestring()#840
Alanscut merged 1 commit into
DaveGamble:masterfrom
Up-wind:master

Conversation

@Up-wind

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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