Commit Graph

1366 Commits

Author SHA1 Message Date
Cameron Armstrong (Nightfox)
254b5abef8 Do not use duplocale if building for libnix because it isnt supported yet 2024-12-24 10:09:50 +08:00
Cameron Armstrong (Nightfox)
d31d635af1 Clean up CMakeLists.txt and remove Amiga specific locale.h guard 2024-12-24 10:09:50 +08:00
Cameron Armstrong (Nightfox)
743ebf53e5 Fix Readme 2024-12-24 10:09:50 +08:00
Cameron Armstrong
f928e7c0fa Get working ror libnix and clib2 2024-12-24 10:09:50 +08:00
Cameron Armstrong
4feebc1cd6 Add support for Commodore Amiga 2024-12-24 10:09:50 +08:00
Eric Hawicz
961c31f8ed Merge pull request #879 from janotomko/null
Handle NULL gracefully in json_tokener_free
2024-12-07 13:33:05 -05:00
Eric Hawicz
c63d4a4194 Merge pull request #878 from 0xfadead/readme-fix-underline
Fix underline bug in README
2024-11-23 19:39:50 -05:00
Eric Hawicz
77bb5c54fc Merge pull request #883 from simonresch/add-oss-fuzz-tests
Add fuzz tests for json_object/point/array apis
2024-11-23 19:39:13 -05:00
Simon Resch
839fbe0d63 Add fuzz tests for json_object/point/array apis
Extends the coverage of fuzz tests executed in OSS-Fuzz.
2024-11-22 07:43:32 +01:00
Eric Hawicz
ff8ed0f094 Issue #881: don't allow json_tokener_new_ex() with a depth < 1 2024-11-17 22:11:24 -05:00
Eric Hawicz
565f181f65 Fix issue #875: cast to unsigned char so bytes above 0x7f aren't interpreted as negative, which was causing the strict-mode control characters check to incorrectly trigger. 2024-11-08 22:20:40 -05:00
Ján Tomko
828c12b226 Handle NULL gracefully in json_tokener_free
Similarly to glibc's free, make json_tokener_free(NULL)
a no-op, to simplify cleanup paths.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2024-11-06 15:23:00 +01:00
Eric Hawicz
474ee12435 Fix the apps/json_parse "-s" (strict) option so it actually does something, and default to non-strict. 2024-11-03 19:44:21 -05:00
Awildidiot
d6b973e047 Fix underline bug in README 2024-11-03 20:03:49 +01:00
Eric Hawicz
07148f33a1 Merge pull request #873 from esiaero/master
Correct year in changelog for 0.18 release
2024-10-10 20:55:18 -04:00
Evan Si
2ec0b87b58 Correct year in changelog for 0.18 release 2024-10-10 23:47:55 +00:00
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
Pavel Zwerschke
906d1581de Update CMakeLists.txt 2024-08-29 10:55:02 +02:00
Pavel Zwerschke
9b8d170d1f Build pkg-config for msvc as well 2024-06-18 00:11:13 +02: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
Bruno Haible
833233faa8 Handle yet another out-of-memory condition.
duplocale() can return NULL, with errno set to ENOMEM.
In this case, bail out and set the current error code to
json_tokener_error_memory.
2024-04-22 01:54:10 +02: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
Alan Urmancheev
0741ce3918 json_tokener.h: json_tokener_parse_verbose: fix typo 2024-04-16 14:56:00 +00: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
Federico Francescon
9c44c7ed52 docs: micro typo in json_object_get doc 2024-03-02 22:41:10 +01:00
Eric Hawicz
401249cbdf Merge pull request #831 from neheb/1
rename WIN32 to _WIN32
2024-02-08 08:11:57 -05:00
Rosen Penev
66f7869219 rename WIN32 to _WIN32
The latter is the proper macro defined by Windows headers.

Fixes compilation under at least clang-cl which mandates function
declarations.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-02-07 18:06:55 -08: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
Even Rouault
f6c8eba84e random_seed.c: add a Coverity Scan suppression
Coverity Scan warns about the use of open() after stat() being a
potential TOCTOU (Time of check time of use) issue. But here there is no
such issue.
2024-01-07 20:55:38 +01: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
evo
eef983b1df Update CMakeLists.txt
Replace with `execute_process` available on v3.0+
2023-12-17 11:19:20 +03:00
evo
c0cf4bc23b Update CMakeLists.txt
Now saved to variable.
2023-12-17 00:32:21 +03:00
evo
e85c8ada54 Fix ECHO_OUTPUT_VARIABLE 2023-12-17 00:23:51 +03:00
evo
2c84476c77 [CMP0153](https://cmake.org/cmake/help/latest/policy/CMP0153.html) 2023-12-12 16:28:41 +03: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
Fabrice Fontaine
7ff7eab603 json_pointer.c: initialize idx
Fix the following build failure with gcc 5:

/home/thomas/autobuild/instance-2/output-1/build/json-c-0.17/json_pointer.c: In function 'json_pointer_result_get_recursive':
/home/thomas/autobuild/instance-2/output-1/build/json-c-0.17/json_pointer.c:193:25: error: 'idx' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    res->index_in_parent = idx;
                         ^

Fixes:
 - http://autobuild.buildroot.org/results/523b35a979d59121fe4e18c38171792b06233940/

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2023-11-08 22:42:48 +01:00