Libfastjson is a new fork of the json-c library, which is optimized for liblognorm processing.
This release provides several changes to libfastjson. Most importantly are the added API objects for fjson_object_get_uint() and fjson_object_array_del_idx(). Also included is a bugfix for a dangling pointer that causes a segfault.
For more details, please refer to the changelog below.
Changelog:
0.99.9 2021-01-26
- add API fjson_object_get_uint()
Thanks to Janmejay Singh for contributing the patch. - add API fjson_object_array_del_idx()
Thanks to Noriko Hosoi for contributing the patch. - bugfix for dangling pointer that causes segfault
The other functions assume that the memory is either set to NULL or a valid
json object. The array_list_del_idx function only moves the elements, but
does not set the pointer to null, which causes the same pointer to remain
in the list (outside of arr->length). Then, when array_list_put_idx is
called, the array_list_expand_internal leaps out, meaning that it has not
set the indices outside of the requested length to 0. array_list_put_idx
finds the pointer, tries to free it and a double free will be incurred,
because the actual element is still in the list.
Thanks to Michael van der Werve for contributing the patch.
Download:
http://download.rsyslog.com/libfastjson/libfastjson-0.99.9.tar.gz
sha256sum: a330e1bdef3096b7ead53b4bad1a6158f19ba9c9ec7c36eda57de7729d84aaee
As always, feedback is appreciated.
Best regards,
Florian Riedl
libfastjson 0.99.9 released