]>
granicus.if.org Git - json-c/log
Björn Esser [Mon, 18 May 2020 18:32:35 +0000 (20:32 +0200)]
doc: Move Doxyfile into doc subdir
Eric Haszlakiewicz [Mon, 18 May 2020 17:31:22 +0000 (17:31 +0000)]
With the change in
cc80203 , Doxyfile no longer needs to be updated for a release.
Eric Hawicz [Mon, 18 May 2020 17:30:13 +0000 (13:30 -0400)]
Merge pull request #619 from besser82/topic/besser82/doxygen_oot
CMake: Fix out-of-tree build for Doxygen documentation.
Eric Hawicz [Mon, 18 May 2020 17:29:21 +0000 (13:29 -0400)]
Merge pull request #618 from besser82/topic/besser82/test_deep_copy
test_deep_copy: Fix assertion value.
Björn Esser [Mon, 18 May 2020 16:20:01 +0000 (18:20 +0200)]
CMake: Fix out-of-tree build for Doxygen documentation.
Björn Esser [Mon, 18 May 2020 15:00:17 +0000 (17:00 +0200)]
test_deep_copy: Fix assertion value.
Eric Hawicz [Mon, 18 May 2020 14:25:54 +0000 (10:25 -0400)]
Merge pull request #617 from besser82/topic/besser82/option_disable_tls
Add an option to disable the use of thread-local storage.
Björn Esser [Mon, 18 May 2020 10:39:38 +0000 (12:39 +0200)]
README: Update configuration options for CMake.
Björn Esser [Mon, 18 May 2020 10:26:47 +0000 (12:26 +0200)]
CMake: Re-format config-option block and re-order it alphabetically.
Björn Esser [Mon, 18 May 2020 09:38:58 +0000 (11:38 +0200)]
CMake: Add an option to disable the use of thread-local storage.
Using thread-local storage may not be desired in all environments
and/or use-cases, thus there should be an option to disable its use
on purpose.
Fixes #451.
Björn Esser [Mon, 18 May 2020 09:38:36 +0000 (11:38 +0200)]
tests: Fix test_double_serializer without thread-local storage.
Eric Hawicz [Sun, 17 May 2020 01:04:11 +0000 (21:04 -0400)]
Merge pull request #614 from stoeckmann/format
Prevent truncation on custom double formatters.
Eric Hawicz [Sun, 17 May 2020 00:55:20 +0000 (20:55 -0400)]
Update issue templates
Tobias Stoeckmann [Sat, 16 May 2020 11:01:10 +0000 (13:01 +0200)]
Prevent truncation on custom double formatters.
A custom double formatter can lead to truncation of the rest of the
JSON document.
If a custom formatter completely fills the buffer used by snprintf
with a trailing dot or comma and the formatting option
JSON_C_TO_STRING_NOZERO has been specified, then an iterator moves
past the ending '\0' (off-by-one buffer overflow) to set an
additional '\0' and adds the first '\0' into the printbuf.
Since '\0' will eventually be considered the terminating character
of the complete printbuf result, all trailing characters are lost.
This leads to an incomplete JSON string as can be seen with the
test case.
The off-by-one can be noticed if compiled with address sanitizer.
Since this is a very special case and a malformed formatter could
do way more harm and is the responsibility of the user of this
library, this is just a protective measure to keep json-c code as
robust as possible.
Eric Haszlakiewicz [Sat, 16 May 2020 01:29:18 +0000 (01:29 +0000)]
Revert part of PR#606 and use isnan/isinf again, but provide macro implementations of those in math_compat.h is needed, as it seems to be on AIX and IBM i systems.
Eric Hawicz [Sat, 16 May 2020 01:15:18 +0000 (21:15 -0400)]
Merge pull request #606 from davidjmccann/master
Improved support for IBM operating systems
David McCann [Wed, 13 May 2020 14:57:54 +0000 (15:57 +0100)]
Improved support for IBM operating systems
Fix compiler errors and warnings when building on IBM operating systems such as AIX and IBM i.
Eric Haszlakiewicz [Wed, 13 May 2020 14:53:05 +0000 (14:53 +0000)]
Issue #604: add check for __MINGW32__ in snprintf_compat.h
Eric Haszlakiewicz [Mon, 11 May 2020 03:03:43 +0000 (03:03 +0000)]
Display a bit of info about what exactly we're benchmarking.
Eric Haszlakiewicz [Mon, 11 May 2020 01:24:46 +0000 (01:24 +0000)]
Ignore the bench/work and bench/data directories.
Eric Hawicz [Mon, 11 May 2020 01:15:47 +0000 (21:15 -0400)]
Merge pull request #602 from ploxiln/parse_uint64_errno
fix json_parse_uint64() usage of errno
Pierce Lopez [Sun, 10 May 2020 17:20:02 +0000 (13:20 -0400)]
fix json_parse_uint64() usage of errno
introduced in #542
fixes #601
Eric Haszlakiewicz [Sun, 10 May 2020 04:04:28 +0000 (04:04 +0000)]
Fix snprintf on windows problem for test4.
Eric Haszlakiewicz [Sun, 10 May 2020 03:58:51 +0000 (03:58 +0000)]
Issue #600: don't rename the static library on Windows, it _needs_ to have a different name because the dll build also creates a "json-c.lib" file.
Eric Haszlakiewicz [Sun, 10 May 2020 03:58:27 +0000 (03:58 +0000)]
Re-format after recent change to fix linkhash.
Eric Haszlakiewicz [Sun, 10 May 2020 03:48:45 +0000 (03:48 +0000)]
Issue #598: avoid building static libraries twice.
Eric Haszlakiewicz [Sun, 10 May 2020 03:32:19 +0000 (03:32 +0000)]
Issue #599: Fix the backwards check in lh_table_insert_w_hash() that was preventing adding more than 11 objects.
Add a test to check for this too.
Eric Hawicz [Sat, 9 May 2020 02:25:15 +0000 (22:25 -0400)]
Merge branch 'master' of https://github.com/json-c/json-c
Eric Hawicz [Sat, 9 May 2020 02:23:28 +0000 (22:23 -0400)]
Merge pull request #597 from ploxiln/json_parse_usage
json_parse demo: fix and use usage() function
Pierce Lopez [Fri, 8 May 2020 22:27:35 +0000 (18:27 -0400)]
json_parse demo: fix and use usage() function
Eric Hawicz [Fri, 8 May 2020 03:23:15 +0000 (23:23 -0400)]
Merge pull request #595 from dota17/static_shared
Support to build both static and shared libraries
hofnarr [Thu, 7 May 2020 23:27:06 +0000 (02:27 +0300)]
cmake-configure: fix enable-static option
hofnarr [Thu, 7 May 2020 23:19:38 +0000 (02:19 +0300)]
cmake: change variable name
hofnarr [Thu, 7 May 2020 23:16:52 +0000 (02:16 +0300)]
cmake: add list for build targets
dota17 [Thu, 7 May 2020 06:50:43 +0000 (14:50 +0800)]
update
Eric Hawicz [Thu, 7 May 2020 03:31:15 +0000 (23:31 -0400)]
Merge pull request #592 from stoeckmann/oob
Prevent out of boundary write on malicious input
Tobias Stoeckmann [Mon, 4 May 2020 17:47:25 +0000 (19:47 +0200)]
Fix integer overflows.
The data structures linkhash and printbuf are limited to 2 GB in size
due to a signed integer being used to track their current size.
If too much data is added, then size variable can overflow, which is
an undefined behaviour in C programming language.
Assuming that a signed int overflow just leads to a negative value,
like it happens on many sytems (Linux i686/amd64 with gcc), then
printbuf is vulnerable to an out of boundary write on 64 bit systems.
dota17 [Wed, 6 May 2020 02:48:53 +0000 (10:48 +0800)]
support to build both static and shared libraries
Tobias Stoeckmann [Mon, 4 May 2020 17:46:45 +0000 (19:46 +0200)]
Prevent division by zero in linkhash.
If a linkhash with a size of zero is created, then modulo operations
are prone to division by zero operations.
Purely protective measure against bad usage.
Tobias Stoeckmann [Mon, 4 May 2020 17:41:16 +0000 (19:41 +0200)]
Protect array_list_del_idx against size_t overflow.
If the assignment of stop overflows due to idx and count being
larger than SIZE_T_MAX in sum, out of boundary access could happen.
It takes invalid usage of this function for this to happen, but
I decided to add this check so array_list_del_idx is as safe against
bad usage as the other arraylist functions.
Eric Haszlakiewicz [Mon, 4 May 2020 03:40:40 +0000 (03:40 +0000)]
Make the benchmark work with pre-cmake versions of json-c. Fetch a few more data files.
Eric Haszlakiewicz [Mon, 4 May 2020 03:24:39 +0000 (03:24 +0000)]
In jc-bench.sh, decode the --before and --after args. Use a separate data dir to avoid re-downloading files when the work dir is cleared.
Eric Haszlakiewicz [Mon, 4 May 2020 01:29:02 +0000 (01:29 +0000)]
Issue #589: drop the rdrand test loops to just 3, tweak comments and add some links to bug reports, and decrease the nesting level of the has_rdrand() function.
Eric Hawicz [Mon, 4 May 2020 01:13:48 +0000 (21:13 -0400)]
Merge pull request #589 from Xyene/detect-broken-rdrand
Detect broken RDRAND during initialization
Tudor Brindus [Sat, 2 May 2020 01:09:22 +0000 (21:09 -0400)]
Detect broken RDRAND during initialization
Some CPUs advertise RDRAND in CPUID, but return 0xFFFFFFFF
unconditionally. To avoid locking up later, test RDRAND during
initialization, and if it returns 0xFFFFFFFF, mark it as nonexistent.
Fixes #588.
Eric Hawicz [Sun, 3 May 2020 18:54:38 +0000 (14:54 -0400)]
Fix printf format issues in apps/json_parse, and actually call the usage() function.
Eric Hawicz [Sun, 3 May 2020 18:52:31 +0000 (14:52 -0400)]
Merge pull request #590 from Xyene/fix-cpuid-segfault
Fix segmentation fault in CPUID check
Tudor Brindus [Sat, 2 May 2020 02:24:20 +0000 (22:24 -0400)]
Fix segmentation fault in CPUID check
Eric Haszlakiewicz [Sun, 3 May 2020 03:50:16 +0000 (03:50 +0000)]
Fix cmake-configure to accept "--prefix=<foo>" in addition to "--prefix <foo>" (see also Issue #591)
Eric Haszlakiewicz [Mon, 27 Apr 2020 04:00:00 +0000 (04:00 +0000)]
Add an initial version of a benchmarking harness for json-c, to be able to more easily compare the performance of different library versions.
Eric Haszlakiewicz [Sun, 26 Apr 2020 04:02:36 +0000 (04:02 +0000)]
Extend the CMakeLists.txt in the apps directory to be usable as a standalone build, to link against other versions of json-c.
Tweak json_parse.c slightly to allow it to build against older json-c versions.
Eric Haszlakiewicz [Tue, 21 Apr 2020 21:35:41 +0000 (21:35 +0000)]
The json_parse command line app doesn't build on Windows, disable it.
Eric Haszlakiewicz [Tue, 21 Apr 2020 03:51:16 +0000 (03:51 +0000)]
Add an apps directory, and a json_parse program to parse an input file and report on memory usage.
This is intended to provide a way, during development, to test out the memory
and performance impacts of a change.
Eric Haszlakiewicz [Mon, 20 Apr 2020 16:06:34 +0000 (16:06 +0000)]
Add a JSON_TOKENER_ALLOW_TRAILING_CHARS flag for json_tokener_set_flags() to allow multiple objects to be parsed from input even when JSON_TOKENER_STRICT is set.
Eric Haszlakiewicz [Mon, 20 Apr 2020 15:13:10 +0000 (15:13 +0000)]
Add an tok_flags field to explicitly specify tokener flags in test_parse and eliminate the previous bogus calls to json_tokener_set_flags()
Eric Haszlakiewicz [Tue, 21 Apr 2020 03:19:17 +0000 (03:19 +0000)]
Issue #471: always create directories with mode 0755, regardless of umask.
Eric Haszlakiewicz [Tue, 21 Apr 2020 01:13:21 +0000 (01:13 +0000)]
Issue #585: don't install config.h
Eric Haszlakiewicz [Sun, 19 Apr 2020 04:17:29 +0000 (04:17 +0000)]
Add a few missing git commands to the release checklist, and change the S3 storage to "Standard", since it's actually (barely) cheaper than "Reduced Redundancy" now.
Eric Haszlakiewicz [Sun, 19 Apr 2020 03:57:08 +0000 (03:57 +0000)]
Update the master branch to version 0.0.14.99
Eric Haszlakiewicz [Sun, 19 Apr 2020 01:31:48 +0000 (01:31 +0000)]
Fill in the ChangeLog for the upcoming 0.14 release.
Eric Haszlakiewicz [Sun, 19 Apr 2020 01:28:24 +0000 (01:28 +0000)]
Fill in a few more pre-release steps to match what we've done for the 0.14 release.
Move the list of contributors to the AUTHORS file.
Eric Haszlakiewicz [Sat, 18 Apr 2020 03:22:52 +0000 (03:22 +0000)]
Rewrite the issued_closed_for_* files so they display a bit nicer.
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:42:46 +0000 (02:42 +0000)]
Explicitly mark several things in json_tokener deprecated.
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:14:13 +0000 (02:14 +0000)]
Re-do clang-format.
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:05:37 +0000 (02:05 +0000)]
Make json_abort() internal to json_object.c
Eric Haszlakiewicz [Sat, 18 Apr 2020 02:02:06 +0000 (02:02 +0000)]
Make json_tokener_validate_utf8() internal to json_tokener.c, and improve the docs a bit.
Eric Haszlakiewicz [Fri, 17 Apr 2020 17:32:17 +0000 (13:32 -0400)]
Merge pull request #582 from dota17/list_closed_issue_pr
add the list of issues& prs closed
dota17 [Fri, 17 Apr 2020 01:40:24 +0000 (09:40 +0800)]
update
dota17 [Thu, 16 Apr 2020 08:30:14 +0000 (16:30 +0800)]
manual adjustment
dota17 [Thu, 16 Apr 2020 08:15:04 +0000 (16:15 +0800)]
add the list of issues& prs closed
Eric Haszlakiewicz [Thu, 16 Apr 2020 03:35:21 +0000 (23:35 -0400)]
Merge pull request #524 from dota17/addTestCase_obj_token
Increase coverage
Eric Haszlakiewicz [Thu, 16 Apr 2020 03:32:59 +0000 (23:32 -0400)]
Merge pull request #581 from Jehan/wip/Jehan/no-strict-prototypes-windows
CMakeLists: do not enforce strict prototypes on Windows.
dota17 [Wed, 15 Apr 2020 12:06:12 +0000 (20:06 +0800)]
remove unsuitable case
Jehan [Wed, 15 Apr 2020 11:01:09 +0000 (13:01 +0200)]
CMakeLists: do not enforce strict prototypes on Windows.
On Windows, or at least when cross-built with Mingw-w64, build fails
because strict prototype fails on an included file (thus nothing we can
do about in json-c code):
> from /home/jehan/dev/src/json-c/json_util.c:44:
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:196:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
> 196 | typedef INT_PTR (WINAPI *FARPROC) ();
> | ^~~~~~~
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:197:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
> 197 | typedef INT_PTR (WINAPI *NEARPROC) ();
> | ^~~~~~~
> /home/jehan/.local/share/crossroad/roads/w64/json-c/include/minwindef.h:198:3: error: function declaration isn't a prototype [-Werror=strict-prototypes]
> 198 | typedef INT_PTR (WINAPI *PROC) ();
> | ^~~~~~~
Let's just disable the errors for Windows build.
Eric Haszlakiewicz [Tue, 14 Apr 2020 19:17:21 +0000 (15:17 -0400)]
Merge pull request #580 from besser82/topic/besser82/fix_cmake_tests
Fix CMake tests for enforced strict prototypes.
Björn Esser [Tue, 14 Apr 2020 18:42:32 +0000 (20:42 +0200)]
Fix CMake tests for enforced strict prototypes.
Eric Haszlakiewicz [Tue, 14 Apr 2020 14:28:16 +0000 (10:28 -0400)]
Merge pull request #527 from dota17/arraylist_test
Arraylist testcase
Eric Haszlakiewicz [Tue, 14 Apr 2020 14:25:13 +0000 (10:25 -0400)]
Merge pull request #579 from besser82/topic/besser82/strict-prototypes
Enforce strict prototypes.
dota17 [Tue, 14 Apr 2020 02:15:27 +0000 (10:15 +0800)]
clang-format two test_util_file.c and test_object_iterator.c
chenguoping [Fri, 3 Jan 2020 02:17:05 +0000 (10:17 +0800)]
Increased the test coverage of json_util.c from 76% to 90.3%.
chenguoping [Fri, 3 Jan 2020 02:05:09 +0000 (10:05 +0800)]
Increased the test coverage of json_object_iterator.c from 0% to 100%
dota17 [Tue, 14 Apr 2020 01:20:51 +0000 (09:20 +0800)]
clang-format test1.c
chenguoping [Fri, 3 Jan 2020 08:56:43 +0000 (16:56 +0800)]
fix valgrind errors
chenguoping [Thu, 2 Jan 2020 11:30:00 +0000 (19:30 +0800)]
testcase for array_list
Björn Esser [Mon, 13 Apr 2020 09:29:52 +0000 (11:29 +0200)]
Enforce strict prototypes.
Eric Haszlakiewicz [Mon, 13 Apr 2020 00:52:01 +0000 (20:52 -0400)]
Merge pull request #578 from besser82/topic/besser82/pkgconfig_install
CMake: Install pkgconfig file in proper location by default
Björn Esser [Sun, 12 Apr 2020 17:21:54 +0000 (19:21 +0200)]
CMake: Install pkgconfig file in proper location by default
The default location for pkconfig files on most systems is:
${CMAKE_INSTALL_LIBDIR}/pkgconfig
Thus the file should get installed in there by default.
Eric Haszlakiewicz [Sun, 12 Apr 2020 02:35:40 +0000 (22:35 -0400)]
Merge pull request #577 from besser82/topic/besser82/json_c_version_test_verbose_on_fail
Be verbose on failing json_c_version test.
Björn Esser [Sat, 11 Apr 2020 19:09:31 +0000 (21:09 +0200)]
Be verbose on failing json_c_version test.
Eric Haszlakiewicz [Sat, 11 Apr 2020 18:45:45 +0000 (14:45 -0400)]
Merge pull request #576 from besser82/topic/besser82/increase_coverage
Test coverage for json_c_version.
Eric Haszlakiewicz [Sat, 11 Apr 2020 18:18:37 +0000 (14:18 -0400)]
Merge pull request #575 from besser82/topic/besser82/cosmetics
Small cosmetics.
Björn Esser [Sat, 11 Apr 2020 10:29:36 +0000 (12:29 +0200)]
Test coverage for json_c_version.
Björn Esser [Sat, 11 Apr 2020 08:34:30 +0000 (10:34 +0200)]
Remove multiple trailing newlines at EOF.
Björn Esser [Fri, 10 Apr 2020 11:10:30 +0000 (13:10 +0200)]
gitignore: Add build folder.
Björn Esser [Fri, 10 Apr 2020 11:06:54 +0000 (13:06 +0200)]
Clean trailing white-space.
Björn Esser [Fri, 10 Apr 2020 11:25:41 +0000 (13:25 +0200)]
Fix line terminators to be UNIX.
Eric Haszlakiewicz [Sat, 11 Apr 2020 03:24:51 +0000 (03:24 +0000)]
Update README.md to remove autoconf instructions in favor of cmake.
Eric Haszlakiewicz [Sat, 11 Apr 2020 02:08:27 +0000 (22:08 -0400)]
Merge pull request #572 from besser82/topic/besser82/cmake_fixes
Small fixes to CMakeLists
Chen [Sat, 11 Apr 2020 01:31:43 +0000 (09:31 +0800)]
Merge pull request #573 from besser82/topic/besser82/coverage
Fix coveralls submission.
Björn Esser [Fri, 10 Apr 2020 13:08:09 +0000 (15:08 +0200)]
Fix coveralls submission.
coveralls-cpp is dead and does not work anymore.
Fortunately there is coveralls-lcov available.