Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3d86402
Fix: OOM vulnerability cause by is_valid_index
thely314 Jan 25, 2026
22e470a
Fix: try to make json_pointer_set_with_array_cb a public api
thely314 Jan 26, 2026
1c3b98d
amend: removed marco related logic
thely314 Jan 26, 2026
bda8299
fix: adapt to the early C std
thely314 Jan 27, 2026
af2671a
meson: use override_dependency
neheb Nov 23, 2025
a0c6bb3
meson: simplify __thread check and fix MinGW
neheb Nov 23, 2025
798d8f7
meson: add license information
neheb Nov 23, 2025
92a4911
meson: use static library for tests
neheb Feb 5, 2026
1d4885a
fix compilation with clang-cl
neheb Nov 25, 2025
d61b41c
github CI: add
neheb Nov 25, 2025
8c01a7c
Merge pull request #903 from neheb/1
hawicz Feb 8, 2026
c293d9b
general callback, safer API & related tests
thely314 Feb 9, 2026
d7f14cb
Merge pull request #917 from thely314/fix/oom-too-large-index
hawicz Feb 14, 2026
8c987e0
Issue #919: Fix build on non-x86 windows. Patch thanks to @dotanbrk
hawicz Feb 19, 2026
52ddfb3
Fix memory leak in test_safe_json_pointer_set, the caller must free t…
hawicz Feb 20, 2026
5320cf9
Add a test to check for issues with deeply nested objects, which can …
hawicz May 3, 2026
e50fb04
Add lh_table_delete_entry_to_tail() and array_list_set_idx() functions.
hawicz Apr 24, 2026
17328a6
Issue #923: Avoid stack recursion in json_object_put() so heavily nes…
hawicz Apr 24, 2026
ccd2803
Merge pull request #924 from json-c/put_no_recurse
hawicz May 4, 2026
1f7589f
Fix function prototypes in deep nesting test (clang compilation)
mbroz May 12, 2026
7947407
Fix expected output for test_deep_nesting
hawicz May 23, 2026
2bfda71
Remove never used struct json_object_iter_info_
hawicz May 23, 2026
dee128f
Issue #927: update the documentation for json_object_iterator to clar…
hawicz May 23, 2026
6167807
Merge pull request #925 from mbroz/fix-build
hawicz May 24, 2026
3e708e4
Drop osx from .travis.yml since macOS builds are no longer supported.
hawicz May 24, 2026
d1018cf
Update test_object_iterator.expect to match current test output.
hawicz May 25, 2026
c6cd1f2
fix locale-dependent strtod in json_object_get_double
dxbjavid Jun 15, 2026
1d65898
Issue #929: fix bad calculation of error offset when parsing in the a…
hawicz Jun 21, 2026
bb9c123
Save stderr from test output, allow for non-zero exit code from tests.
hawicz Jun 21, 2026
d9d8cab
Add tests for the json_parse cli tool.
hawicz Jun 21, 2026
e181207
Issue #928 - work around over-zealous uninitialized check in chromebr…
hawicz Jun 21, 2026
cce075f
Merge pull request #930 from dxbjavid/get-double-locale-radix
hawicz Jun 21, 2026
5647679
deep copy values in json_patch copy op to avoid aliasing and cycles
dxbjavid Jun 24, 2026
d0cc187
ci: set least-privilege GITHUB_TOKEN permissions for meson workflow
Alb3e3 Jun 27, 2026
d2adb47
Merge pull request #932 from Alb3e3/harden-ci-permissions
hawicz Jun 27, 2026
3c1cf2b
Merge pull request #931 from dxbjavid/patch-copy-deep-copy
hawicz Jun 27, 2026
c54e690
More updates to ChangeLog for a 0.19 release
hawicz Jun 27, 2026
c1c7e50
Update the master branch to version 0.19.99
hawicz Jun 27, 2026
b299553
Issue #824: start listing releases on github
hawicz Jun 27, 2026
54f5526
fix signed overflow negating INT64_MIN in json_object_int_inc
dxbjavid Jun 27, 2026
f291fa8
free objects outside assert() in json_object_put
dxbjavid Jun 30, 2026
3aa996b
Issue #934: Be sure to clear _user_delete in _json_object_put_maybe_f…
hawicz Jul 4, 2026
e006975
Merge pull request #936 from dxbjavid/put-free-outside-assert
hawicz Jul 4, 2026
0c3a5a1
Issue #934: Also set _userdata=NULL in _json_object_maybe_free() so j…
hawicz Jul 4, 2026
324e5ca
Merge pull request #933 from dxbjavid/int-inc-int64min-overflow
hawicz Jul 4, 2026
16e394b
reject out-of-range double in get_int64/get_uint64
dxbjavid Jul 6, 2026
aab7925
Issue #941: fix "defined but not used" errors when building with a c+…
hawicz Jul 11, 2026
e65444a
Merge pull request #940 from dxbjavid/get-int64-double-boundary
hawicz Jul 12, 2026
9d116a5
fix out-of-bounds read for negative errno in _json_c_strerror
dxbjavid Jul 13, 2026
56a0e3f
fix installing json-c headers with meson and missing pkgconfig file
vonericsen Jul 13, 2026
69be99e
fix json_object_put() to return 1 for freed scalars and empty containers
arr2036 Jul 14, 2026
dfd37bc
Merge pull request #945 from arr2036/json-object-put-return-value
hawicz Jul 16, 2026
f61e612
Merge pull request #943 from Seagate/meson_install_fix
hawicz Jul 16, 2026
0ea5f6c
Merge pull request #942 from dxbjavid/strerror-negative-oob
hawicz Jul 16, 2026
eed664e
reject null op/path/from fields in json_patch_apply
dxbjavid Jul 16, 2026
e248056
require string type for patch op/path/from fields
dxbjavid Jul 18, 2026
1e39345
Merge pull request #946 from dxbjavid/patch-null-field-fields
hawicz Jul 18, 2026
70f3169
reject empty reference token as array index in json_pointer
dxbjavid Jul 20, 2026
1bd2e4b
Merge pull request #949 from dxbjavid/pointer-empty-index-token
hawicz Jul 21, 2026
ff18c75
reject leading zeros in strict-mode number parsing
dxbjavid Jul 28, 2026
c0d4626
Merge pull request #953 from dxbjavid/number-leading-zero-strict
hawicz Aug 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
231 changes: 231 additions & 0 deletions .github/workflows/meson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
name: meson

on: [push, pull_request]

concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: true

permissions:
contents: read

jobs:
Linux-GCC:
runs-on: ubuntu-22.04
strategy:
matrix:
cc: ['9', '13']
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-gcc@v1
with:
version: ${{matrix.cc}}

- name: Install packages
run: |
python3 -m pip install meson ninja

- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
Linux-Clang:
runs-on: ubuntu-22.04
strategy:
matrix:
cc: ['9', '22']
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-clang@v1

- name: Install packages
run: |
python3 -m pip install meson ninja

- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
VisualStudio:
runs-on: windows-latest
strategy:
matrix:
platform: ['x64', 'x86']
steps:
- uses: actions/checkout@v4

- name: Install packages
run: |
python -m pip install meson ninja

- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.platform}}

- name: Compile and Test
env:
CFLAGS: '/analyze'
run: |
meson setup "${{github.workspace}}/build" --wrap-mode=forcefallback -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
VisualStudio-clang-cl:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Install packages
run: |
python -m pip install meson ninja

- uses: ilammy/msvc-dev-cmd@v1

- name: Compile and Test
env:
CC: clang-cl
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
MSYS2:
runs-on: windows-latest
strategy:
matrix:
platform: ['UCRT64', 'CLANG64']
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4

- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.platform}}
pacboy: >-
cc:p
cmake:p
meson:p
ninja:p
pkgconf:p

- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
Cygwin:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: 'MSYS'
install: >-
gcc
meson
ninja
- name: Compile and Test
run: |
meson setup build -Dwarning_level=3 -Dcpp_std=gnu++20 -Dbuildtype=debug
meson compile -C build --verbose
meson test -C build --verbose
MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Install packages
run: |
brew install meson

- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
DragonflyBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/dragonflybsd-vm@v1
with:
prepare: |
pkg install -y ninja meson pkgconf
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
FreeBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y ninja meson pkgconf
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
NetBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/netbsd-vm@v1
with:
prepare: |
/usr/sbin/pkg_add meson pkgconf
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
OmniOS:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/omnios-vm@v1
with:
prepare: |
pkg install gcc14 meson-313 ninja pkg-config python-313
run: |
/usr/lib/python3.13/bin/meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
/usr/lib/python3.13/bin/meson compile -C "${{github.workspace}}/build" --verbose
/usr/lib/python3.13/bin/meson test -C "${{github.workspace}}/build" --verbose
OpenBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/openbsd-vm@v1
with:
prepare: |
pkg_add ninja meson pkgconf
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
Alpine:
runs-on: ubuntu-latest
strategy:
matrix:
platform: ['x86_64', 'x86', 'armhf', 'armv7', 'aarch64', 'ppc64le', 'riscv64', 's390x']
defaults:
run:
shell: alpine.sh {0}
steps:
- uses: actions/checkout@v4
- uses: jirutka/setup-alpine@v1
with:
branch: edge
arch: ${{matrix.platform}}
packages: >
build-base pkgconf meson samurai
- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dbuildtype=debug
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
18 changes: 2 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ matrix:
- cmake
env: CHECK="true"

# osx
- os: osx
osx_image: xcode13.4
env: XCODE="true" CHECK="true"

# run coveralls
- os: linux
dist: xenial
Expand Down Expand Up @@ -109,9 +104,6 @@ matrix:
- lcov -r build/all_coverage.info '/usr/*' '*CMakeFiles*' '*fuzz*' '*test*' -o build/coverage.info
- coveralls-lcov --verbose build/coverage.info

# allow_failures:
# - os: osx

before_install:
- echo $CC
- echo $LANG
Expand All @@ -125,8 +117,6 @@ before_install:
fi

before_script:
# XXX osx on travis doesn't work w/ set -e, so turn it off :(
- set +e
- mkdir -p build || echo "Failed to mkdir build"
- cd build || echo "Failed to cd build"
- cmake .. || echo "Failed to run cmake"
Expand All @@ -135,12 +125,8 @@ script:
- make
# when using bionic, Travis seems to ignore the "addons" section, so installing the packages with apt-get...
- if [ -n "$CHECK" ]; then
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew install doxygen;
else
if [ "$TRAVIS_DIST" = "bionic" ]; then
sudo apt-get install -y valgrind cppcheck doxygen;
fi;
if [ "$TRAVIS_DIST" = "bionic" ]; then
sudo apt-get install -y valgrind cppcheck doxygen;
fi;
make distcheck;
if type cppcheck &> /dev/null ; then cppcheck --error-exitcode=1 --quiet *.h *.c tests/ ; fi;
Expand Down
7 changes: 6 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Alan Coopersmith <alan.coopersmith@oracle.com>
Alan Urmancheev <108410815+alurm@users.noreply.github.com>
Alb3e3 <74142887+Alb3e3@users.noreply.github.com>
Alexander Dahl <post@lespocky.de>
Alexandru Ardelean <ardeleanalex@gmail.com>
An7ar35 <eadavison@protonmail.com>
Expand All @@ -10,7 +11,7 @@ Awildidiot <69577313+0xfadead@users.noreply.github.com>
Björn Esser <besser82@fedoraproject.org>
BonsaY <bonsay@posteo.de>
Bruno Haible <bruno@clisp.org>
Cameron Armstrong <cameronscottarmstrong@gmail.com>
Cameron Armstrong (Nightfox) <cameronscottarmstrong@gmail.com>
Careles <zhancheng1996@gmail.com>
changyong guo <guo1487@163.com>
chenguoping <chenguopingdota@163.com>
Expand All @@ -24,6 +25,7 @@ David McCann <mccannd@uk.ibm.com>
DeX77 <dex@dragonslave.de>
Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
dota17 <chenguopingdota@163.com>
dxbjavid <dxbjavid@gmail.com>
Eric Haszlakiewicz <erh+git@nimenees.com>
Eric Hawicz <erh+git@nimenees.com>
Evan Si <evsi@amazon.com>
Expand All @@ -40,6 +42,7 @@ hofnarr <hofnarr@hofnarr.fi>
ihsinme <61293369+ihsinme@users.noreply.github.com>
Ivan Romanov <drizt@land.ru>
Jaap Keuter <jaap.keuter@xs4all.nl>
JaisonZheng <1254186821@qq.com>
Jakov Smolic <jakov.smolic@sartura.hr>
janczer <menshikov.ivn@gmail.com>
Ján Tomko <jtomko@redhat.com>
Expand All @@ -56,13 +59,15 @@ Kizuna-Meraki <z9@kizunameraki.de>
Lakshmi-Surekha <Lakshmi.Kovvuri@ibm.com>
Leon Gross <leon.gross@rub.de>
Liang, Gao <liang.gao@intel.com>
lone <lonechan314@qq.com>
Luca Mannella <luca.mannella@studenti.polito.it>
Marc <34656315+MarcT512@users.noreply.github.com>
Matthias Gatto <matthias.gatto@protonmail.com>
max <mpano91@gmail.com>
Micah Snyder <micasnyd@cisco.com>
Michael Clark <michael@metaparadigm.com>
Michele Locati <michele@locati.it>
Milan Broz <gmazyland@gmail.com>
myd7349 <myd7349@gmail.com>
Pascal Cuoq <cuoq@trust-in-soft.com>
Pavel Zwerschke <pavelzw@gmail.com>
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cmake_minimum_required(VERSION 3.9...3.12)

# JSON-C library is C only project.
# PROJECT_VERSION{,_MAJOR,_MINOR,_PATCH} set by project():
project(json-c LANGUAGES C VERSION 0.18.99)
project(json-c LANGUAGES C VERSION 0.19.99)

# set default build type if not specified by user
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -267,6 +267,7 @@ if (HAVE_SYS_RANDOM_H)
endif()
if (HAVE_SYS_RESOURCE_H)
check_symbol_exists(getrusage "sys/resource.h" HAVE_GETRUSAGE)
check_symbol_exists(setrlimit "sys/resource.h" HAVE_SETRLIMIT)
endif()

check_symbol_exists(strtoll "stdlib.h" HAVE_STRTOLL)
Expand Down Expand Up @@ -543,7 +544,7 @@ add_library(${PROJECT_NAME}
${JSON_C_RESOURCES}
)
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION 5.4.0
VERSION 5.5.0
SOVERSION 5)
list(APPEND CMAKE_TARGETS ${PROJECT_NAME})
# If json-c is used as subroject it set to target correct interface -I flags and allow
Expand Down
10 changes: 9 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

0.19 (up to commit 8948568, 2026-01-18)
0.19 (up to commit 3c1cf2b, 2026-06-27)
========================================

Deprecated and removed features:
Expand Down Expand Up @@ -32,6 +32,14 @@ Significant changes and bug fixes
* Fix bug involving supplemental code points that look like high surrogates
* Fix runtime issue with test_util_file.c in Windows (add O_BINARY)
* Fix macro WIN32_LEAN_AND_MEAN redefined
* Issue #914: Fix Memory usage regression due to newlocale() on macOS
* Issue #916: Fix OOM via large array index in json_pointer_set
* Issue #923: Avoid stack recursion in json_object_put()
* Issue #927: CVE-2026-9146 - update json_object_iterator documentation
* Issue #929: CVE-2026-11322 - fix information disclosure bug in apps/json_parse (not installed by default)
* Issue #930: fix locale-dependent strtod in json_object_get_double
* Issue #931: deep copy values in json_patch copy op to avoid aliasing and cycles


0.18 (up to commit 6bfab90, 2024-09-15)
========================================
Expand Down
11 changes: 11 additions & 0 deletions RELEASE_CHECKLIST.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,15 @@ Copy and paste this output into the wiki page at:

------------

Create a release on GitHub

* https://github.com/json-c/json-c/releases
* Click on "Draft a new release"
* Choose the appropriate tag
* Fill in title, refer to the ChangeLog in the release notes
* Attach the same tarballs as were uploaded to S3
* When satisfied, click Publish release.

------------

Send an email to the mailing list.
Loading