CVE-2026-4743: Cjson Insertiteminarray Missing Null Check

The function `cJSON_InsertItemInArray` lacks a NULL pointer check for the `newitem` parameter. Passing a NULL pointer to this function results in a NULL pointer dereference. Ensure that `newitem` is validated before operating on its fields.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0C
greprules fetch cve-2026-4743-cjson-insertiteminarray-missing-null-check --engine opengrep

Description

The function `cJSON_InsertItemInArray` lacks a NULL pointer check for the `newitem` parameter. Passing a NULL pointer to this function results in a NULL pointer dereference. Ensure that `newitem` is validated before operating on its fields.