aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-09-18Update apiref.rstAllen1-1/+3
fix the documentation about json_dumps. refs #471
2019-09-16add the loop key length macro for circular reference detectallen3-5/+6
2019-08-12add loop check in json deep copy #457allen4-17/+109
2019-08-09Merge pull request #489 from AllenX2018/masterCorey Farrell1-0/+7
Update CMakeLists.txt
2019-08-09Update CMakeLists.txtAllen1-0/+7
add "-Wno-format-truncation" to supress format truncation warning in cmake
2019-07-26Merge pull request #487 from cmeister2/cmeister2/ossfuzzcorpusCorey Farrell1-0/+3
ossfuzz: Zip up all "input" files to use as a seed corpus
2019-07-26Merge pull request #485 from cmeister2/cmeister2/fuzzerdiagsCorey Farrell1-8/+93
ossfuzz: Improvements to json_load_dump_fuzzer
2019-07-24ossfuzz: Zip up all "input" files to use as a seed corpusMax Dymond1-0/+3
2019-07-24Depending on the dump_mode byte, dump out as a string or as a callback.Max Dymond1-7/+34
2019-07-24Merge pull request #486 from cmeister2/cmeister2/osstravisCorey Farrell2-1/+15
Ensure OSS fuzz travis builds work for PRs
2019-07-24Use the correct branch for OSS Fuzz as well.Max Dymond1-1/+3
2019-07-24Ensure OSS fuzz travis builds work for PRsMax Dymond2-1/+13
Use the correct repository for cloning when doing a push build or a pull-request. Only do one fuzzer build!
2019-07-24ossfuzz: Improvements to json_load_dump_fuzzerMax Dymond1-6/+64
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-22Merge pull request #484 from cmeister2/cmeister2/fixossaflCorey Farrell1-1/+1
One byte fix to fix OSS Fuzz AFL support
2019-07-22One byte fix to fix OSS Fuzz AFL supportMax Dymond1-1/+1
"x$LIB_FUZZING_ENGINE" is not the correct filename to test for - remove the x!
2019-07-22Merge pull request #480 from cmeister2/cmeister2/ossfuzzCorey Farrell10-1/+228
oss-fuzz: Create a fuzzing target for jansson
2019-07-22Merge pull request #483 from AllenX2018/masterCorey Farrell1-1/+1
correct spelling mistake
2019-07-22correct spelling mistakeallen1-1/+1
2019-07-19Move ossfuzz directory and use Makefile.amMax Dymond12-28/+99
2019-06-28Create a fuzzing target for janssonMax Dymond7-0/+156
2019-03-13Merge pull request #465 from seanbright/jansson-versionCorey Farrell8-2/+122
Add runtime version checking functions
2019-03-12Add runtime version checking functionsSean Bright8-2/+122
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.
2018-11-26CHANGES: Fix 2.12 release date2.12Petri Lehtinen1-1/+1
2018-11-26Merge pull request #448 from coreyfarrell/2.12v2.12Petri Lehtinen6-7/+47
jansson 2.12
2018-11-25jansson 2.12Corey Farrell6-7/+47
2018-11-25Merge pull request #447 from vsoch/update/install-readmeCorey Farrell1-2/+3
Update/install readme
2018-11-24extra comma!vsoch1-1/+1
2018-11-24small updates to READMEvsoch1-2/+3
2018-11-08Merge pull request #445 from coreyfarrell/fix-444Corey Farrell2-7/+23
Remove inappropriate jsonp_free which caused segmentation fault.
2018-11-05Remove inappropriate jsonp_free which caused segmentation fault.Corey Farrell2-7/+23
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-10-17Merge pull request #436 from edgale/warningsCorey Farrell3-6/+2
removed various warnings
2018-10-15fixed extra bracketMaximilian Röhrle1-1/+1
2018-10-15removed explicit castsMaximilian Röhrle2-6/+6
2018-09-29Merge pull request #439 from coreyfarrell/codecoverageCorey Farrell1-1/+1
Fix code coverage ignored paths.
2018-09-29Fix code coverage ignored paths.Corey Farrell1-1/+1
* 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-28Merge pull request #438 from coreyfarrell/issue-437Corey Farrell2-36/+185
json_pack: Improve handling of formats with '?' and '*'.
2018-09-25More work on json_pack error reporting.Corey Farrell2-7/+93
* 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-25json_pack: Improve handling of formats with '?' and '*'.Corey Farrell2-30/+93
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-04Merge pull request #435 from edgale/masterPetri Lehtinen2-2/+2
unreferenced variable fix
2018-08-31removed various warningsMaximilian Röhrle4-12/+8
2018-08-30This fixes https://github.com/akheron/jansson/issues/434Maximilian Röhrle2-2/+2
2018-08-12Rename a varialble that shadows another onePetri Lehtinen2-5/+5
Fixes #430
2018-08-09Enable -Bsymbolic-functions linker flag whenever possibleMichal Privoznik2-1/+31
It was discovered fairly recently that JSON parsing libraries use common pattern to name their exported symbols (they all use json_ prefix). So eventually it happens that two symbols from two different libraries have the same name. This will lead to cryptic crashes (see [1] and [2]). Linking with -Bsymbolic-functions prevents this. 1: https://gitlab.gnome.org/GNOME/json-glib/issues/33 2: https://groups.google.com/forum/#!topic/jansson-users/7Efx-RI45IU Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2018-08-02Merge pull request #423 from coreyfarrell/gcc-8Petri Lehtinen2-2/+9
Deal with warnings under gcc 8.
2018-07-30Merge pull request #424 from Crayon2000/patch-1Petri Lehtinen1-1/+1
Update copyright for 2018
2018-07-30Merge pull request #427 from lxin/va_endPetri Lehtinen1-5/+12
Call va_end after va_copy in json_vsprintf
2018-07-25Call va_end after va_copy in json_vsprintfXin Long1-5/+12
As said in man doc: "Each invocation of va_copy() must be matched by a corresponding invocation of va_end() in the same function." va_copy may alloc memory in some system, it's necessay to free it by va_end. Fixes: efe6c7b3f2b3 ("Add json_sprintf and json_vsprintf") Signed-off-by: Xin Long <lucien.xin@gmail.com>
2018-07-14Update copyright for 2018Crayon1-1/+1
2018-07-14Deal with warnings under gcc 8.Corey Farrell2-2/+9
Recent versions of gcc have introduced compiler warnings for string operations that could be truncated. This caused problems with -Werror. src/error.c used strncpy to write "..." to a string, but skipped writing the NUL terminator. Switch this to use memcpy. src/load.c produced warnings from snprintf writing error strings that could be truncated. Added code to autotools build to detect `-Wno-format-truncation', add it to AM_CFLAGS if supported.
2018-07-09Avoid invalid memory read in json_pack()Petri Lehtinen1-1/+4
Initial patch by @bharjoc-bitdefender Fixes #421