Eric Hawicz
c793374f16
Update openssl command to work for newer versions of openssl.
2024-09-15 13:16:48 -04:00
Eric Hawicz
e9bd26d568
Update the master branch to version 0.18.99
2024-09-15 13:06:06 -04:00
Eric Haszlakiewicz
7ebdc4ddf8
Update abi-check.sh to compare 0.16 and 0.18
2024-09-15 16:10:57 +00:00
Eric Hawicz
87900c0a2e
Fix the expected output for test_parse
2024-09-15 11:59:05 -04:00
Eric Hawicz
e5ca4d3b3d
Update ChangeLog, AUTHORS and issues_closed_for_0.18.md for an upcoming 0.18 release.
2024-09-15 11:54:50 -04:00
Eric Hawicz
e3db88d114
Merge pull request #871 from json-c/disallow-control-chars
...
Issue #867 : disallow control characters in strict mode.
2024-09-15 11:22:58 -04:00
Eric Hawicz
6bfab90c87
Issue #867 : disallow control characters in strict mode.
2024-09-15 10:37:45 -04:00
Eric Hawicz
ecb7a4c9a3
Merge pull request #864 from pavelzw/patch-1
...
Build pkg-config for msvc as well
2024-08-29 21:08:52 -04:00
Eric Hawicz
6e481aa061
Merge pull request #861 from bhaible/handle-another-oom-condition
...
Handle yet another out-of-memory condition.
2024-05-05 09:49:26 -04:00
Eric Haszlakiewicz
781675758f
Although CMAKE_C_COMPILER_FRONTEND_VARIANT is defined, it's not always set to some value. Fix builds for cases when it's blank.
2024-04-28 17:15:42 +00:00
Eric Hawicz
31a22fb2da
Issue #857 : fix a few places where json_tokener should have been returning json_tokener_error_memory but wasn't.
2024-04-21 10:37:16 -04:00
Eric Hawicz
0051f2dbe0
Merge pull request #858 from alurm/master
...
json_tokener.h: json_tokener_parse_verbose: fix typo
2024-04-16 11:23:09 -04:00
Eric Hawicz
e3464a2ab4
Issue #829 : attempt to detect clang-cl.exe and pass MSVC-compatile command line arguments.
2024-03-29 22:40:45 -04:00
Eric Hawicz
61016412fb
Issue #850 : fill in & adjust the "@returns" docs for several functions.
2024-03-29 18:46:05 -04:00
Eric Hawicz
f2eac07129
doxygen can't handle html on heading, split that to separate lines
...
https://github.com/doxygen/doxygen/issues/10466
2024-03-29 18:45:22 -04:00
Eric Hawicz
e93ae70417
Fix issue #854 : Set error=json_tokener_error_memory in json_tokener_parser_verbose() when allocating the tokener fails.
2024-03-29 18:09:12 -04:00
Eric Hawicz
0bc2dd5e60
Merge pull request #852 from fedefrancescon/docs/micro-typo-fix
...
docs: micro typo in json_object_put doc
2024-03-02 17:31:24 -05:00
Eric Hawicz
401249cbdf
Merge pull request #831 from neheb/1
...
rename WIN32 to _WIN32
2024-02-08 08:11:57 -05:00
Eric Hawicz
dabed80523
Merge pull request #849 from rouault/random_seed_toctou
...
random_seed.c: add a Coverity Scan suppression
2024-01-08 12:45:39 -05:00
Eric Hawicz
76f819e51d
Merge pull request #846 from evo-i/CMP0153
...
Use execute_process instead of exec_program
2023-12-17 07:23:07 -05:00
Eric Haszlakiewicz
407ddb4350
Issue #842 - fix one particular sign conversion warning.
...
There are many others that show up if we were to add -Wsign-conversions,
but this is the only one using a literal constant.
2023-11-30 13:59:13 +00:00
Eric Hawicz
33337523f5
Merge pull request #839 from ffontaine/master
...
json_pointer.c: initialize idx
2023-11-08 18:11:13 -05:00
Eric Hawicz
88bce2b38e
Merge pull request #837 from HansolChoe/fix-tokener-parse-ex-fuzzer
...
Add type checking for parsed objects in tokener_parse_ex_fuzzer
2023-10-19 07:49:32 -04:00
Eric Hawicz
ad8b8afa7d
Take 2 fixing the placement of json_tokener_error_memory in the enum. (json_tokener_error_size is an actual error, *not* a measure of the size of the enum!)
2023-09-22 22:26:21 -04:00
Eric Hawicz
4186537557
Merge pull request #827 from robert-pang/master
...
Resolve build issue in tokener_parse_ex_fuzzer.c
2023-09-11 00:13:45 +02:00
Eric Hawicz
9ff6b68baf
Merge pull request #826 from emlix/cmake-policies
...
CMake: remove needless policy setting
2023-09-11 00:10:55 +02:00
Eric Haszlakiewicz
502522a93d
Update the master branch to version 0.17.99
2023-08-12 19:08:59 +00:00
Eric Hawicz
12ea386989
Add an abi-check.sh script that shows how to run the abi-compliance-checker, update release creation steps slightly.
2023-08-12 14:56:51 -04:00
Eric Haszlakiewicz
6dd8618170
Also fix messages returned from json_tokener_error_desc() (broke due to the ordering change of enum json_tokener_error)
2023-08-12 18:52:32 +00:00
Eric Hawicz
3dad6941da
Move the json_tokener_error_memory entry to the end of enum json_tokener_error to restore binary compatibility with 0.16
2023-08-12 13:54:50 -04:00
Eric Hawicz
f7e9d8e216
Update the AUTHORS file and add issues_closed_for_0.17.md for the upcoming 0.17 release
2023-08-12 13:53:27 -04:00
Eric Hawicz
85ed501a3d
Update the ChangeLog for 0.17 based on notable commits since 0.16
2023-08-08 17:31:38 -04:00
Eric Hawicz
077661f3d1
Fix issue #823 : add back json_number_chars, but only because it's part of the public API.
2023-08-06 15:36:19 -04:00
Eric Hawicz
87127d31c6
Merge pull request #679 from GitMensch/patch-1
...
Let json-c be used with obsolete compilers
2023-08-05 22:32:37 -04:00
Eric Hawicz
1ee12100b6
PR #679 : add workaround for old compilers w/o stdint.h (i.e. VS2008 and earlier)
2023-08-05 22:11:30 -04:00
Eric Hawicz
0bcfb6bc84
Merge pull request #822 from SSharshunov/master
...
Added option to disable app build
2023-08-04 11:47:23 -04:00
Eric Hawicz
2316dbae85
Merge pull request #702 from commodo/json_patch
...
json_patch: add first implementation only with patch application
2023-07-31 22:19:30 -04:00
Eric Hawicz
612ba56f06
Don't export json_pointer_get_internal, move json_object_array_insert_idx and json_patch_apply to the JSONC_0.17 section in json-c.sym
2023-07-31 22:18:04 -04:00
Eric Hawicz
469bc0e4bb
Work around a somewhat misleading warning about "a function declaration without a prototype is deprecated in all versions of C" in test1.c
2023-07-31 22:18:04 -04:00
Eric Hawicz
ce3184243a
Fix json_patch_apply handling of removing the whole document (i.e. "path":"").
...
Enable all disabled tests, add a few more including some with null documents.
2023-07-31 22:18:04 -04:00
Eric Hawicz
9dbf2880cc
Adjust the behavior of the args passed to json_patch_apply to make it easier to do in place modifications, and add a struct json_patch_error to report more details on failures.
2023-07-31 22:18:04 -04:00
Eric Hawicz
a14a3a680c
Fix an uninitialized memory access in json_pointer.
...
Add comments describing when the fields of the internal struct json_pointer_get_result are valid.
2023-07-31 22:18:03 -04:00
Eric Hawicz
efc530594b
Create a json_pointer_private.h and move a few things there, fix test warnings, note array_list_insert_idx is private.
2023-07-31 22:18:03 -04:00
Eric Hawicz
71d845e819
Issue #668 : add the option to specify "cmake -DUSELOCALE_NEEDS_FREELOCALE=1" to work around a bug in older versions of FreeBSD (<12.4).
2023-07-30 13:38:15 -04:00
Eric Hawicz
c8b0a90e95
Issue #808 : turn off -Wshorten-64-to-32 for clang builds (aka iOS builds) to workaround "implicit conversion loses integer precision" warnings.
2023-07-30 11:38:01 -04:00
Eric Hawicz
9b36c72945
Merge pull request #772 from cosmo-ray/color
...
add JSON_C_TO_STRING_COLOR option
2023-07-13 18:04:48 -04:00
Eric Hawicz
e9d3ab209a
Merge pull request #759 from c3h2-ctf/truncation
...
json_tokener_parse_ex: handle out of memory errors
2023-07-04 11:45:57 -04:00
Eric Haszlakiewicz
4d529f92dc
Issue #688 : Only exclude generated doc/* files, keep the CMakeLists.txt, etc... so the nodoc tarball can still be built.
2023-07-01 18:02:00 +00:00
Eric Haszlakiewicz
d0f32a5a43
Stop linking a copy of _json_c_strerror() (strerror_override.c) into the tests.
...
That hasn't been needed since since commit 6068d3f , which changed that code to
check an env var instead ("_JSON_C_STRERROR_ENABLE").
Fixes issue #812 , about dup symbols in static builds with clang.
2023-03-28 23:08:39 +00:00
Eric Hawicz
efd536af48
Merge pull request #810 from dijonkitchen/patch-1
...
docs: update to Internet Standard reference
2023-03-10 14:54:44 -05:00
Eric Haszlakiewicz
d1716fe431
Bump up the minimum cmake version to 3.9.
...
This gets us up to a version that supports features we're already using
(i.e. add_compile_options), but stops short of a cmake that requires
c++11, which some OSes still don't support.
Closes issue #774
2023-02-23 01:01:14 +00:00
Eric Haszlakiewicz
1741bcd3ea
Issue #570 : note brief instructions for building on Android.
2023-01-05 00:25:09 +00:00
Eric Hawicz
343f24f920
Merge pull request #804 from yrashk/cmp-0042
...
Problem: cmake 3.25.1 warns about CMP0042 not being set
2022-12-27 09:32:33 -05:00
Eric Hawicz
6ec5e5842d
Merge pull request #803 from yrashk/patch-2
...
Problem: confusing error message in snprintf_compat.h
2022-12-27 09:26:30 -05:00
Eric Hawicz
b6ba9429d0
Merge pull request #802 from yrashk/patch-1
...
Problem: modern CMake warns about version 2.8
2022-12-27 09:25:58 -05:00
Eric Hawicz
79c147203e
Merge pull request #796 from fedefrancescon/test-add-int-get
...
Added Test for get int functions
2022-11-16 22:23:11 -05:00
Eric Haszlakiewicz
bc35549f90
Update expected output for test_parse, missed in the previous commit.
2022-10-30 19:42:42 +00:00
Eric Haszlakiewicz
d6f46ae104
Explicitly check for integer overflow/underflow when parsing integers with JSON_TOKENER_STRICT.
2022-10-30 19:39:30 +00:00
Eric Haszlakiewicz
c50bf9df9c
Apply same EINVAL handling to json_parse_uint64() as was done for json_parse_int64(). Document that overflow/underflow for these functions is not an error, but sets errno=ERANGE.
2022-10-30 03:25:32 +00:00
Eric Haszlakiewicz
57bef5edc4
Issue #792 - set errno=EINVAL if parsing the string in json_parse_int64 fails, to match the docs for json_object_get_int.
2022-10-26 02:19:38 +00:00
Eric Hawicz
777dd06be8
Merge pull request #790 from Sarcares/patch-1
...
Small update to README file
2022-09-13 22:15:48 -04:00
Eric Hawicz
81f0807b63
Merge pull request #784 from rouault/get_time_seed_coverity_scan_silence
...
get_time_seed(): silence warning emitted by Coverity Scan static analyzer
2022-08-16 18:10:06 -04:00
Eric Hawicz
9417f4e726
Merge pull request #783 from kraj/master
...
Fix build with clang-15+
2022-08-14 08:19:19 -04:00
Eric Hawicz
ac4dfa44cb
Merge pull request #782 from DimitriPapadopoulos/codespell
...
Fix typos found by codespell
2022-08-13 09:43:50 -04:00
Eric Haszlakiewicz
bdd5e03d6e
Apply some of the fixes from PR #740 , although by using size_t instead of castings.
2022-07-31 19:28:48 +00:00
Eric Hawicz
4b0c6de760
Merge pull request #757 from c3h2-ctf/big
...
json_object_from_fd_ex: fail if file is too large
2022-07-31 14:27:32 -04:00
Eric Haszlakiewicz
253a5fa99d
Issue #705 : disable locale handling when building for a uClibc system because its duplocale() function (intentionally) crashes.
2022-07-30 20:27:35 +00:00
Eric Haszlakiewicz
9749b0cb66
When serializing with JSON_C_TO_STRING_PRETTY set, keep the opening and closing curly or square braces on same line for empty objects or arrays. Issue #778 .
2022-07-30 19:27:14 +00:00
Eric Haszlakiewicz
2e9b7456a5
Update Travis links to point at travis-ci.com instead of travis-ci.org
2022-07-26 23:47:58 +00:00
Eric Haszlakiewicz
5282e73600
Entirely drop mode bits from open(O_RDONLY) to avoid warnings on certain platforms. Fixes issue #779 .
2022-07-26 23:43:30 +00:00
Eric Haszlakiewicz
8b35a78d29
Trim a few travis builds, update others to more recent toolchains.
2022-07-24 20:37:14 +00:00
Eric Haszlakiewicz
22773b1e51
Fix the expected output for test_set_serializer.
2022-07-24 19:00:27 +00:00
Eric Haszlakiewicz
16208fc01a
Add test to check for the memory leak mentioned in issue #781
2022-07-24 18:59:26 +00:00
Eric Hawicz
2a2d861bc0
Merge pull request #781 from dddaniel/master
...
Fix memory leak with emtpy strings in json_object_set_string
2022-07-24 14:15:42 -04:00
Eric Haszlakiewicz
d28ac67dde
Fix issue #775 - use a loop instead of list(TRANSFORM ...) to support cmake < 3.12.
2022-06-27 02:15:24 +00:00
Eric Hawicz
5d98f7825a
Merge pull request #776 from stoeckmann/typo
...
Fix typo
2022-06-21 21:39:00 -04:00
Eric Haszlakiewicz
6ee0a35a20
Fix #771/#768 by marking usage() as "noreturn" instead of using "FALLTHRU" in the case statement where it'd called.
2022-06-13 01:02:53 +00:00
Eric Hawicz
11546bfd07
Merge pull request #769 from An7ar35/issue-768
...
Issue #768
2022-06-03 23:14:16 -04:00
Eric Haszlakiewicz
49c3721a5a
Unset NDEBUG so assert() is enabled in all tests. One more fix there when building with -DCMAKE_BUILD_TYPE=release.
2022-05-30 15:39:54 +00:00
Eric Haszlakiewicz
2f0942bdd7
Specify dependent libraries, including -lbsd, in a more consistent way so linking against a static json-c works better. Related issue #766
...
Use target_link_libraries, plus fill in Libs.private in json-c.pc so pkg-config --static --libs works appropriately.
Also, only link against libbsd when arc4random is actually found there.
2022-05-30 15:30:11 +00:00
Eric Haszlakiewicz
6ba1adf8ef
Include the tests and apps directories at the _end_, since order in the
...
cmake rules matters, and fix compile warnings now that we're building
those sources with all the regular flags.
2022-05-30 14:33:16 +00:00
Eric Haszlakiewicz
86b46cac07
Add --disable-static and --disable-dynamic options to the cmake-configure script.
2022-05-30 14:31:08 +00:00
Eric Haszlakiewicz
f2fc1ca00a
Note the DSIABLE_JSON_POINTER and DISABLE_EXTRA_LIBS build options on the README
2022-04-14 12:57:43 +00:00
Eric Haszlakiewicz
acccefd770
Add a "Getting Help" section to the README.
2022-04-14 12:55:32 +00:00
Eric Haszlakiewicz
de5a64888a
Update the master branch to version 16.99
2022-04-14 12:29:39 +00:00
Eric Haszlakiewicz
7e3eba72db
Clarify how to set the uploaded release tarballs to be publically readable.
2022-04-14 12:17:59 +00:00
Eric Haszlakiewicz
7d303478a4
Update the ChangeLog with recent changes, in preparation for a 0.16 release.
...
Add a list of issues closed for this release.
2022-04-14 01:05:38 +00:00
Eric Haszlakiewicz
66dcdf549e
Add new authors since the 0.15 release, tweak instructions for how to update that list.
2022-04-14 01:04:53 +00:00
Eric Hawicz
4902f9cb87
Merge pull request #765 from jvoisin/patch-1
...
Improve a bit the coverage of the fuzzer
2022-04-13 14:28:51 -04:00
Eric Haszlakiewicz
46b58ad9e7
Fix issue #764 : adjust test_util_file to match new output (changed in 6e53347)
2022-04-08 22:58:24 +00:00
Eric Hawicz
0b937f6173
Merge pull request #758 from c3h2-ctf/context
...
Preserve context if out of memory
2022-04-04 18:01:39 -04:00
Eric Hawicz
65274cf3b5
Update issue templates
2022-04-04 17:10:31 -04:00
Eric Haszlakiewicz
e244146dfd
Remove single quote from #error line. Fixes issue #761
2022-03-25 01:12:07 +00:00
Eric Hawicz
a1c092bd7b
Merge pull request #760 from BonsaiYi/error
...
Code style: removed unneeded double-quotes
2022-03-23 00:14:36 -04:00
Eric Hawicz
79459b2de2
Merge pull request #755 from c3h2-ctf/error
...
Fix error messages
2022-03-19 10:05:48 -04:00
Eric Hawicz
2326e34390
Merge pull request #754 from c3h2-ctf/doc
...
Minor improvements to documentation
2022-03-19 10:04:58 -04:00
Eric Hawicz
f0d93cee14
Merge pull request #748 from c3h2-ctf/printbuf
...
sprintbuf(): test for all vsnprintf error values
2022-03-07 00:06:57 -05:00
Eric Hawicz
9b832c8710
Merge pull request #752 from c3h2-ctf/typos
...
Fix typos
2022-03-06 23:33:42 -05:00
Eric Hawicz
a4389f4f30
Merge pull request #749 from c3h2-ctf/sprintbuf
...
sprintbuf(): handle printbuf_memappend errors
2022-03-03 21:32:09 -05:00
Eric Hawicz
4493db76d6
Merge pull request #750 from c3h2-ctf/clearmem
...
printbuf_memset(): set gaps to zero
2022-03-03 21:29:27 -05:00