Commit Graph

956 Commits

Author SHA1 Message Date
Petri Lehtinen
355aa42b48
Merge pull request #502 from AllenX2018/fix-issue453
fix issue #453:update FindSphinx.cmake to better align with find sphinx package.
2019-10-17 08:09:20 +03:00
Petri Lehtinen
92873e9d27
Merge pull request #503 from AllenX2018/loadfd-doc
add note for non-blocking file descriptor used for json_loadfd
2019-10-17 08:07:02 +03:00
Petri Lehtinen
9e1c37c889
Merge pull request #506 from AllenX2018/add-json_equal-test-case
fix typo & add negative test case for test_equal_complex
2019-10-17 07:33:36 +03:00
allen
010092c7bd fix typo & add negative test case for test_equal_complex 2019-10-15 17:41:57 +08:00
allen
b403bbba8d modify some words 2019-10-12 10:56:23 +08:00
allen
a585a2778e add note for non-blocking file descriptor used for json_loadfd 2019-10-10 19:43:17 +08:00
AllenX2018
4f26548e3a fix issue #453 2019-10-10 16:16:10 +08:00
Petri Lehtinen
c436bec682
Merge pull request #496 from grdowns/vcpkg-instructions
Add vcpkg installation instructions
2019-09-27 15:08:00 +03:00
grdowns
f5c0afecdb Add vcpkg installation instructions 2019-09-26 16:54:02 -07:00
Petri Lehtinen
5371816480
Merge pull request #494 from luzpaz/typos
Fix various typos
2019-09-23 11:31:23 +03:00
Petri Lehtinen
09e455275c
Merge pull request #490 from AllenX2018/master
add loop check in json deep copy #457
2019-09-23 11:30:33 +03:00
luz.paz
3adf3e6a5a Fix various typos
Found via `codespell -q 2` (v1.17.0.dev0)
2019-09-20 13:35:56 -04:00
Allen
672b6df474
Update apiref.rst
fix the documentation about json_dumps. refs #471
2019-09-18 16:18:51 +08:00
allen
53e9dd848f add the loop key length macro for circular reference detect 2019-09-16 15:50:59 +08:00
allen
63fb81faa5 add loop check in json deep copy #457 2019-08-12 11:17:25 +08:00
Corey Farrell
a1f297aa83
Merge pull request #489 from AllenX2018/master
Update CMakeLists.txt
2019-08-09 04:37:06 -04:00
Allen
e68c5ea0b5
Update CMakeLists.txt
add "-Wno-format-truncation" to supress format truncation warning in cmake
2019-08-09 15:41:57 +08:00
Corey Farrell
af66d3f4c0
Merge pull request #487 from cmeister2/cmeister2/ossfuzzcorpus
ossfuzz: Zip up all "input" files to use as a seed corpus
2019-07-26 09:43:44 -04:00
Corey Farrell
a6f6ec1856
Merge pull request #485 from cmeister2/cmeister2/fuzzerdiags
ossfuzz: Improvements to json_load_dump_fuzzer
2019-07-26 08:58:16 -04:00
Max Dymond
287b5acb07
ossfuzz: Zip up all "input" files to use as a seed corpus 2019-07-24 19:41:45 +01:00
Max Dymond
3858607be0
Depending on the dump_mode byte, dump out as a string or as a callback. 2019-07-24 19:14:17 +01:00
Corey Farrell
0ed750a7ea
Merge pull request #486 from cmeister2/cmeister2/osstravis
Ensure OSS fuzz travis builds work for PRs
2019-07-24 13:46:24 -04:00
Max Dymond
7feae084b1
Use the correct branch for OSS Fuzz as well. 2019-07-24 10:50:21 +01:00
Max Dymond
a6f436fefc
Ensure OSS fuzz travis builds work for PRs
Use the correct repository for cloning when doing a push build or a
pull-request.

Only do one fuzzer build!
2019-07-24 10:43:03 +01:00
Max Dymond
66dec35c8c
ossfuzz: Improvements to json_load_dump_fuzzer
Add in diagnostics to json_load_dump_fuzzer so that if FUZZ_VERBOSE is
defined in the environment, additional debug information about the
current test case is output to stderr.

Replace json_dumps by json_dump_callback so that memory is not exhausted
by excessively nested json objects.
2019-07-24 10:17:19 +01:00
Corey Farrell
1ac79b2558
Merge pull request #484 from cmeister2/cmeister2/fixossafl
One byte fix to fix OSS Fuzz AFL support
2019-07-22 06:40:34 -04:00
Max Dymond
6e26599980
One byte fix to fix OSS Fuzz AFL support
"x$LIB_FUZZING_ENGINE" is not the correct filename to test for - remove
the x!
2019-07-22 11:23:54 +01:00
Corey Farrell
3bfa3f1946
Merge pull request #480 from cmeister2/cmeister2/ossfuzz
oss-fuzz: Create a fuzzing target for jansson
2019-07-22 05:29:22 -04:00
Corey Farrell
813c3e2c47
Merge pull request #483 from AllenX2018/master
correct spelling mistake
2019-07-22 04:19:26 -04:00
allen
c49fbc7082 correct spelling mistake 2019-07-22 11:00:31 +08:00
Max Dymond
24cc9dd078
Move ossfuzz directory and use Makefile.am 2019-07-19 09:52:37 +01:00
Max Dymond
100e5549b6
Create a fuzzing target for jansson 2019-06-28 14:05:39 +01:00
Corey Farrell
b333f3656d
Merge pull request #465 from seanbright/jansson-version
Add runtime version checking functions
2019-03-13 08:24:41 -04:00
Sean Bright
76300601d9 Add runtime version checking functions
This patch adds two new exported functions:

* `jansson_version_str` - Returns a human-readable version number
* `jansson_version_cmp` - Returns an integer less than, equal to, or greater
  than zero if the runtime version of Jansson is found, respectively, to be
  less than, to match, or be greater than the provided major, minor, and micro.
2019-03-12 13:03:34 -04:00
Petri Lehtinen
f4498d2856 CHANGES: Fix 2.12 release date 2018-11-26 10:59:06 +02:00
Petri Lehtinen
71c4e8ec21
Merge pull request #448 from coreyfarrell/2.12
jansson 2.12
2018-11-26 09:10:04 +01:00
Corey Farrell
10afd33efb
jansson 2.12 2018-11-25 03:40:56 -05:00
Corey Farrell
2a31c4f475
Merge pull request #447 from vsoch/update/install-readme
Update/install readme
2018-11-25 02:40:09 -05:00
vsoch
f44c137a84 extra comma! 2018-11-24 23:29:14 -08:00
vsoch
7197810714 small updates to README 2018-11-24 23:27:23 -08:00
Corey Farrell
4ba5c7cc5d
Merge pull request #445 from coreyfarrell/fix-444
Remove inappropriate jsonp_free which caused segmentation fault.
2018-11-08 16:00:32 -05:00
Corey Farrell
e262ea5fcd
Remove inappropriate jsonp_free which caused segmentation fault.
pack_string should never free str on error.  This wouldn't be a problem
except the check for `ours` was inverted.  Just remove the check for
ours since the true condition is unreachable.

json_vpack_ex also had an error check for s.has_error.  This can never
be true unless value is NULL.

Expand pack_unpack testing to cover empty format string, NULL object
value with non-null concatenated key, array containing a non-null object
after a NULL (error) string.

Fixes #444
2018-11-05 16:49:22 -05:00
Corey Farrell
6ac0eefed0
Merge pull request #436 from edgale/warnings
removed various warnings
2018-10-17 06:29:47 -04:00
Maximilian Röhrle
226b34d546
fixed extra bracket 2018-10-15 07:05:02 +02:00
Maximilian Röhrle
d115953347 removed explicit casts 2018-10-15 06:58:19 +02:00
Corey Farrell
15f77c8f47
Merge pull request #439 from coreyfarrell/codecoverage
Fix code coverage ignored paths.
2018-09-29 15:37:56 -04:00
Corey Farrell
ef080d17b5
Fix code coverage ignored paths.
* Replace 'tests/*' with '*/test/*'.
* Replace '/usr/*' with '/usr/include/*'.  This resolves an issue where
  it was impossible to test code coverage with the source in /usr/src.
* Ignore build/include/jansson.h as we just want src/jansson.h.
2018-09-29 14:36:54 -04:00
Corey Farrell
4f91b1d072
Merge pull request #438 from coreyfarrell/issue-437
json_pack: Improve handling of formats with '?' and '*'.
2018-09-28 14:47:33 -04:00
Corey Farrell
8d659113d5
More work on json_pack error reporting.
* Remove errant line-feed from pack_object error message.
* Correct error message in pack_object_inter.
* Create pack_integer / pack_real to get the correct error messages on
  failure when packing numeric values.
* Add tests for packing NAN and infinity directly, in an array and as
  an object value.
2018-09-25 18:03:06 -04:00
Corey Farrell
5df5fc5b13
json_pack: Improve handling of formats with '?' and '*'.
When NULL is received for an optional argument we should not set an
error message as this would block later error messages. If NULL is
received for a non-optional string we should set has_error. Set
has_error for UTF-8 errors to ensure optional strings with UTF-8
errors are not replaced with json_null(). Use 'purpose' argument in
NULL error messages of read_string.

Add error handling and tests for invalid formats where '+', '#', or '%'
is used on an optional string 's?' or 's*'.

Fix NULL string error messages to use 'purpose'.

Refactor skipping of '*' token, this is now handled by read_string and
pack_object_inter. This allows invalid format strings such as 's*#' and
's*+' to produce error messages.

Fixes #437
2018-09-25 16:35:19 -04:00