[pull] master from json-c:master - #103
Open
pull[bot] wants to merge 61 commits into
Open
Conversation
An OOM vulnerability exists in the json_pointer_set function (and related functions). See issue #916 for more details. To fix that, added a sanity check in the is_valid_index function to limit the maximum value of a parsed array index. Provided a configurable macro for modification. Signed-off-by: lone <lonechan314@qq.com>
make json_pointer_set_with_array_cb a public api, along with a function with wrapped callback Signed-off-by: lone <lonechan314@qq.com>
Signed-off-by: lone <lonechan314@qq.com>
Signed-off-by: lone <lonechan314@qq.com>
Allows wraps to use the dependency_names syntax instead of the possibly changing variable syntax. Signed-off-by: Rosen Penev <rosenp@gmail.com>
> was missing. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Needed as tests use private APIs that are not exported. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Something in the configure stage goes wrong where it believe strncasecmp is present but the header defining it is not. Work around this. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
meson: use override_dependency
- Changed json_pointer_set_with_array_cb to json_pointer_set_with_cb, related cb updated - Added tests(test_safe_json_pointer_set.*) for new-exported funcs, also updated cmake & meson Signed-off-by: lone <lonechan314@qq.com>
Fix: OOM vulnerability cause by is_valid_index
…he passed value when json_pointer_set failed. Also, reformat.
…cause problems due to stack recursion.
…ted object trees can be freed.
avoid recursion during json_object_put
This patch fixes the build error with clang-21 tests/test_deep_nesting.c:19:34: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 19 | static char *generate_json_string() by fixing generate_json_string() definition. It also removes prototypes for static functions that are not needed.
…ify that any change of the fields present on the object being iterated invalidates the iterator. Update the test to show what kind of changes _are_ allowed.
Fix build with clang-21
…pps/json_parse tool. Also, show the failing character in hex to ensure error output is readable.
fix locale-dependent strtod in json_object_get_double
The meson workflow only builds and tests across platforms; none of its
jobs write to the repository, packages, or other GitHub resources. Add a
workflow-level `permissions: { contents: read }` block so the default
GITHUB_TOKEN follows least privilege instead of inheriting the broad
read/write scopes granted by default.
ci: set least-privilege GITHUB_TOKEN permissions for meson workflow
deep copy values in json_patch copy op to avoid aliasing and cycles
…ree() to avoid calling it twice. Add a test to check.
free objects outside assert() in json_object_put
…son_object_put doesn't try to use it as a _delete_parent value. Update the test_deep_nesting test output.
fix signed overflow negating INT64_MIN in json_object_int_inc
reject out-of-range double in json_object_get_int64/get_uint64
This commit fixes the install path for json-c headers when running `meson install`. Previously some showed in /usr/include/ rather than /usr/include/json-c This also adds generating the pkgconfig .pc file for this project. Signed-off-by: Tyler Erickson <tyler.erickson@seagate.com>
The iterative rewrite in 17328a6 made json_object_put() return 0 for freed scalars, strings and empty containers, contradicting the documented contract in json_object.h. Distinguish "freed" from "still referenced" in _json_object_put_maybe_free() and add regression tests.
fix json_object_put() to return 1 for freed scalars and empty containers
fix installing json-c headers with meson and missing pkgconfig file
fix out-of-bounds read for negative errno in _json_c_strerror
reject null op/path/from fields in json_patch_apply
reject empty reference token as array index in json_pointer
reject leading zeros in strict-mode number parsing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )