Skip to content

Releases: DaveGamble/cJSON

v1.7.18

13 May 10:28
Compare
Choose a tag to compare

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

26 Dec 02:27
Compare
Choose a tag to compare

Fixes:

1.7.16

05 Jul 03:23
cb8693b
Compare
Choose a tag to compare

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

25 Aug 11:19
d348621
Compare
Choose a tag to compare

Fixes:

  • Fix potential core dumped for strrchr, see #546
  • Fix null pointer crash in cJSON_CreateXxArray, see #538
  • Fix several null pointer problems on allocation failure, see #526
  • Fix a possible dereference of null pointer, see #519
  • Fix windows build failure about defining nan, see #518

1.7.14

03 Sep 09:46
d273527
Compare
Choose a tag to compare

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

02 Apr 15:53
Compare
Choose a tag to compare

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

16 May 23:06
3c89356
Compare
Choose a tag to compare

Fixes:

  • Fix infinite loop in cJSON_Minify (potential Denial of Service), thanks @Alanscut for reporting. See #354
  • Fix link error for Visual Studio. Thanks @tan-wei, see #352
  • Undefine true and false for cJSON_Utils before redefining them. Thanks @raiden00pl, see #347

1.7.11

14 Apr 22:18
93688cb
Compare
Choose a tag to compare

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 and false macros before setting them if they exist. See #339, thanks @raiden00pl for reporting

1.7.10

20 Dec 17:21
Compare
Choose a tag to compare

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

16 Dec 10:18
Compare
Choose a tag to compare

Fixes:

  • Fix a bug where cJSON_GetObjectItemCaseSensitive would pass a nullpointer to strcmp 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