DaveGamble / cJSON

Ultralightweight JSON parser in ANSI C
MIT License
10.83k stars 3.22k forks source link

Check for NULL in cJSON_DetachItemViaPointer, fixes #882 #886

Closed vwvw closed 2 months ago

vwvw commented 2 months ago

I added two NULL check to avoid NULL dereferences in cJSON_DetachItemViaPointer as discussed in #882.

Once again, all credit goes to @tregua87

vwvw commented 2 months ago

I also added a test.