# # spec file for package libfastjson # # Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define somajor 4 Name: libfastjson Version: 1.2304.0 Release: 1.6 Summary: JSON parsing library, a fork of json-c License: MIT Group: Development/Libraries/C and C++ URL: https://github.com/rsyslog/libfastjson Source: https://download.rsyslog.com/libfastjson/%{name}-%{version}.tar.gz BuildRequires: pkgconfig %description A JSON parsing library, a fork of json-c, developed by the rsyslog team and used for rsyslog and liblognorm. %package -n libfastjson%{somajor} Summary: JSON parsing library Group: System/Libraries %description -n libfastjson%{somajor} A JSON parsing library, a fork of json-c, developed by the rsyslog team and used for rsyslog and liblognorm. This package includes the libfastjson library. %package -n libfastjson-devel Summary: Development headers and libraries for libfastjson Group: Development/Libraries/C and C++ Requires: libfastjson%{somajor} = %{version} %description -n libfastjson-devel A JSON parsing library, a fork of json-c, developed by the rsyslog team and used for rsyslog and liblognorm. This package includes header files and scripts needed for developers using the libfastjson library %prep %autosetup %build %configure --disable-static %make_build %check %make_build check %install %make_install find %{buildroot} -type f -name "*.la" -delete -print %post -n libfastjson%{somajor} -p /sbin/ldconfig %postun -n libfastjson%{somajor} -p /sbin/ldconfig %files -n libfastjson%{somajor} %license COPYING %{_libdir}/libfastjson.so.%{somajor}* %files -n libfastjson-devel %doc AUTHORS %license COPYING %{_libdir}/libfastjson.so %{_includedir}/libfastjson %{_libdir}/pkgconfig/libfastjson.pc %changelog * Wed May 3 2023 Andreas Stieger - update to 1.2304.0: * CVE-2020-12762: integer overflow and out-of-bounds write via large JSON file (boo#1171479) * Mon Jun 14 2021 Jan Engelhardt - Remove --with-pic (no effect with --disable-static). - Drop unsubstantiated claims from descriptions. * Wed Feb 10 2021 Dirk Müller - update to 0.99.9: - add API fjson_object_get_uint() - add API fjson_object_array_del_idx() - 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. * Thu May 24 2018 kukuk@suse.de - Use %%license instead of %%doc [bsc#1082318] * Fri Jan 12 2018 astieger@suse.com - update to 0.99.8: * make build under gcc7 with strict settings (warning==error) * bugfix: constant key names not properly handled * fix potentially invalid return value of fjson_object_iter_begin * fix small potential memory leak in json_tokener * Tue Nov 14 2017 astieger@suse.com - update to 0.99.7: * add option for case-insensitive comparisons * Remove userdata and custom-serialization functions * Thu Aug 3 2017 astieger@suse.com - update to 0.99.6: * fixes for platforms other than GNU/Linux * Mon May 8 2017 astieger@suse.com - update to 0.99.5: * fix floating point representation when fractional part is missing * m4: fix detection of atomics * add fjson_object_dump() and fjson_object_write() functions * Fri Jan 27 2017 ndas@suse.de - This library is needed for latest rsyslog(fate#320546) * Thu Aug 4 2016 astieger@suse.com - update to 0.99.4: * fix tautology comparison in tautology in `fjson_object_iter_equal` drop 0001-Follow-up-to-d4b3a2d-fix-tautology-comparison-in-fjs.patch * fix build problems with gcc6 drop 0002-Follow-up-to-8c49ee7-fix-build-with-gcc6.patch * Thu Jul 14 2016 astieger@suse.com - update 0.99.3: * exit() is no longer called in unexpected situations * fjson_version now returns configure VERSION * fix invalid Unicode representation for some non US-ASCII - add patch to fix compile (and logic) error 0001-Follow-up-to-d4b3a2d-fix-tautology-comparison-in-fjs.patch - fix build with gcc6, adding 0002-Follow-up-to-8c49ee7-fix-build-with-gcc6.patch * Sun Mar 13 2016 astieger@suse.com - update to 0.99.2 * new API: json_object_get_member_count() * make comaptible with autoconf < 2.64 * 0.99.1 was not released * Sat Jan 2 2016 astieger@suse.com - initial package