| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|\
| |
| | |
docs: update to Internet Standard reference
|
|/ |
|
|
|
|
|
|
|
| |
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
|
| |
|
|\
| |
| | |
Problem: cmake 3.25.1 warns about CMP0042 not being set
|
| |
| |
| |
| | |
Solution: set it explictly to OLD behavior
|
|\ \
| | |
| | | |
Problem: confusing error message in snprintf_compat.h
|
| |/
| |
| | |
Solution: fix it to reflect what's happening properly
|
|\ \
| |/
|/| |
Problem: modern CMake warns about version 2.8
|
|/
|
|
|
|
|
|
|
| |
The warning is as follows:
```
Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.
```
Solution: set it at 2.8.12
|
|\
| |
| | |
Added Test for get int functions
|
| | |
|
|/
|
|
| |
`json_object_get_uint64`
|
| |
|
|
|
|
| |
JSON_TOKENER_STRICT.
|
|
|
|
| |
json_parse_int64(). Document that overflow/underflow for these functions is not an error, but sets errno=ERANGE.
|
|
|
|
| |
fails, to match the docs for json_object_get_int.
|
|\
| |
| | |
Small update to README file
|
|/
|
| |
it could be necessary to execute make install
|
|\
| |
| | |
get_time_seed(): silence warning emitted by Coverity Scan static analyzer
|
|/
|
|
|
|
|
|
| |
It warns about the return of time() being truncated to 32 bit, which is
not an issue here.
(this warning was emitted because of the https://github.com/OSGeo/gdal
project embedding a copy of libjson-c and running Coverity Scan
analysis)
|
|\
| |
| | |
Fix build with clang-15+
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This helps compiling with MS compiler, error seems to be
due to defining a variable within the body of the function
its allowed in c99 but not in c89. This should fix build with
MSVC 16.0.40219.1 compiler from Visual Studio 14 2015
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
| |
| |
| | |
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
Fixes
json_util.c:63:35: error: a function declaration without a prototype is deprecated in all versions of C [-We
rror,-Wstrict-prototypes]
const char *json_util_get_last_err()
^
void
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|\
| |
| | |
Fix typos found by codespell
|
|/
|
|
| |
Do not fix typos from past commits found in release notes.
|
|
|
|
| |
castings.
|
|\
| |
| | |
json_object_from_fd_ex: fail if file is too large
|
| |
| |
| |
| |
| |
| |
| |
| | |
If the input file is too large to fit into a printbuf then return an
error value instead of silently truncating the parsed content.
This introduces errno handling into printbuf to distinguish between an
input file being too large and running out of memory.
|
| |
| |
| |
| | |
because its duplocale() function (intentionally) crashes.
|
| |
| |
| |
| | |
closing curly or square braces on same line for empty objects or arrays. Issue #778.
|
| | |
|
| |
| |
| |
| | |
platforms. Fixes issue #779.
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix memory leak with emtpy strings in json_object_set_string
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a json string object is updated with a bigger string, a new
malloc'ed buffer is used to store the new string and it's size is made
negative to indicate that an external buffer is in use.
When that same json string object get's updated again with an empty
stirng (size = 0), the new external malloc'ed buffer is still used.
But the fact that the new size value is not negative removes the
indicator that the externally malloc'ed buffer is used.
This becomes a problem when the object get's updated again with any
other string, because a new buffer will be malloced and linked to the
object while to old one won't be free'd.
This causes a memory leak when updating a json string with
json_object_set_stirng() which has previously been updated
with an empty string.
Example:
--
obj = json_object_new_string("data");
json_object_set_string(obj, "more data");
json_object_set_string(obj, "");
json_object_set_string(obj, "other data"); /* leaks */
--
This commit fixes the issue by free'ing the external buffer when an
empty string is set and use the internal one again.
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
|
| |
| |
| |
| | |
< 3.12.
|
|\ \
| | |
| | | |
Fix typo
|
|/ / |
|
| |
| |
| |
| | |
in the case statement where it'd called.
|
|\ \
| | |
| | | |
Issue #768
|
|/ /
| |
| |
| | |
"-Werror=implicit-fallthrough" flag
|
| |
| |
| |
| | |
building with -DCMAKE_BUILD_TYPE=release.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
cmake rules matters, and fix compile warnings now that we're building
those sources with all the regular flags.
|
| |
| |
| |
| | |
script.
|