Releases: DaveGamble/cJSON
Releases · DaveGamble/cJSON
v1.7.18
Fixes:
- Add NULL check to cJSON_SetValuestring()(CVE-2024-31755), see #839 and #840
- Remove non-functional list handling of compiler flags, see #851
- Fix heap buffer overflow, see #852
- remove misused optimization flag -01, see #854
- Set free'd pointers to NULL whenever they are not reassigned immediately after, see #855 and #833
Full Changelog: v1.7.17...v1.7.18
1.7.17
Fixes:
- Fix null reference in cJSON_SetValuestring(CVE-2023-50472), see #809
- Fix null reference in cJSON_InsertItemInArray(CVE-2023-50471), see #809 and #810
1.7.16
Features:
- Add an option for ENABLE_CJSON_VERSION_SO in CMakeLists.txt, see #534
- Add cmake_policy to CMakeLists.txt, see #613
- Add cJSON_SetBoolValue, see #639
- Add meson documentation, see #761
Fixes:
- Fix memory leak in merge_patch, see #611
- Fix conflicting target names 'uninstall', see #617
- Bump cmake version to 3.0 and use new version syntax, see #587
- Print int without decimal places, see #630
- Fix 'cjson_utils-static' target not exist, see #625
- Add allocate check for replace_item_in_object, see #675
- Fix a null pointer crash in cJSON_ReplaceItemViaPointer, see #726
1.7.15
1.7.14
Note:
Since v1.7.13 changed the stucture of linkedlist to improve the efficiency of adding item to array/object, array->child->prev
now is point to tail node
, this won't change any behavior except for backward through the linkedlist.
The current backward through the linkedlist could be in this way:
cJSON *last = ...; // the last is known
cJSON *current_item = last;
do {
current_item = current_item->prev;
} while(current_item != last);
Fixes:
- optimize the way to find tail node, see #503
- Fix WError error on macosx because NAN is a float. Thanks @sappo, see #484
- Fix some bugs in detach and replace. Thanks @miaoerduo, see #456
1.7.13
Features:
- add new API of cJSON_ParseWithLength without breaking changes. Thanks @caglarivriz, see #358
- add new API of cJSON_GetNumberValue. Thanks @Intuition, see#385
- add uninstall target function for CMake. See #402
- Improve performance of adding item to array. Thanks @xiaomianhehe, see #430, #448
- add new API of cJSON_SetValuestring, for changing the valuestring safely. See #451
- add return value for cJSON_AddItemTo... and cJSON_ReplaceItem... (check if the operation successful). See #453
Fixes:
- Fix clang -Wfloat-equal warning. Thanks @paulmalovanyi, see #368
- Fix make failed in mac os. See #405
- Fix memory leak in cJSONUtils_FindPointerFromObjectTo. Thanks @andywolk for reporting, see #414
1.7.12
1.7.11
Fixes:
- Fix a bug where cJSON_Minify could overflow it's buffer, both reading and writing. This is a security issue. (see #338). Big thanks @bigric3 for reporting.
- Unset
true
andfalse
macros before setting them if they exist. See #339, thanks @raiden00pl for reporting
1.7.10
Fixes:
- Fix package config file for
libcjson
. Thanks @shiluotang for reporting (#321) - Correctly split lists in
cJSON_Utils
's merge sort. Thanks @andysCaplin for the fix (#322)
1.7.9
Fixes:
- Fix a bug where
cJSON_GetObjectItemCaseSensitive
would pass a nullpointer tostrcmp
when called on an array (#315). Thanks @yuweol for reporting. - Fix error in
cJSON_Utils
where the case sensitivity was not respected (#317). Thanks @yuta-oxo for fixing. - Fix some warnings detected by the Visual Studio Static Analyzer (#307). Thanks @bnason-nf