cJSON v1.7.15 Release Notes

Release Date: 2021-08-25 // almost 2 years ago
  • ๐Ÿ›  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

Previous changes from v1.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