]>
granicus.if.org Git - json-c/log
Eric Haszlakiewicz [Sun, 10 May 2015 01:35:22 +0000 (21:35 -0400)]
Merge pull request #149 from cicku/patch-2
SONAME bump
Eric Haszlakiewicz [Sat, 9 May 2015 01:31:37 +0000 (21:31 -0400)]
Merge pull request #171 from Nzbuu/vs2010_build
Update configuration for VS2010 and win64
Eric Haszlakiewicz [Sat, 9 May 2015 01:19:48 +0000 (21:19 -0400)]
Merge pull request #182 from tpetazzoni/libm-fix
Link against libm when needed
Eric Haszlakiewicz [Sat, 9 May 2015 01:19:05 +0000 (21:19 -0400)]
Merge pull request #180 from yegorich/silent
Enable silent build by default
Thomas Petazzoni [Fri, 1 May 2015 10:52:18 +0000 (12:52 +0200)]
Link against libm when needed
In certain C libraries (e.g uClibc), isnan() and related functions are
implemented in libm, so json-c needs to link against it. This commit
therefore adds an AC_TRY_LINK() test to check whether a program
calling isnan() can be properly linked with no special flags. If not,
we assume linking against libm is needed.
The json-c.pc.in file is also adjusted so that in the case of static
linking against json-c, -lm is also used.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Yegor Yefremov [Sat, 25 Apr 2015 19:57:38 +0000 (21:57 +0200)]
Enable silent build by default
James Myatt [Thu, 5 Feb 2015 16:38:47 +0000 (16:38 +0000)]
Build random_seed.c as well
James Myatt [Thu, 5 Feb 2015 16:15:06 +0000 (16:15 +0000)]
Add x64 build configurations
James Myatt [Thu, 5 Feb 2015 16:12:28 +0000 (16:12 +0000)]
Set CompileAsCpp flag (Required for vs2010/winsdk71)
Revert some project settings to defaults
James Myatt [Thu, 5 Feb 2015 16:02:58 +0000 (16:02 +0000)]
Update VS project to include current source files
James Myatt [Thu, 5 Feb 2015 15:59:19 +0000 (15:59 +0000)]
Use more appropriate casts
James Myatt [Thu, 5 Feb 2015 15:58:39 +0000 (15:58 +0000)]
Add missing include file to random_seed
James Myatt [Thu, 5 Feb 2015 15:58:12 +0000 (15:58 +0000)]
Define macros from inttypes.h when not available
James Myatt [Thu, 5 Feb 2015 15:57:14 +0000 (15:57 +0000)]
json_tokener requires INF and NAN
James Myatt [Thu, 5 Feb 2015 15:56:49 +0000 (15:56 +0000)]
Define INFINITY and NAN when missing
James Myatt [Thu, 5 Feb 2015 15:55:25 +0000 (15:55 +0000)]
Include config.h in linkhash so that HAVE_ENDIAN_H is defined (if available)
James Myatt [Thu, 5 Feb 2015 15:54:19 +0000 (15:54 +0000)]
Updated config for vs2010/winsdk71 as well as vs2013
Define JSON_C_HAVE_INTTYPES_H in json_config.h.win32 only
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:41:31 +0000 (22:41 -0500)]
Merge pull request #168 from bugness-chl/master
Tightening the number parsing algorithm
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:35:36 +0000 (22:35 -0500)]
Merge pull request #163 from sixlettervariables/fix-win32-build-problems
Fix Win32 build problems
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:12:49 +0000 (22:12 -0500)]
Merge pull request #144 from mhei/master
Introduce json_object_from_fd
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:10:10 +0000 (03:10 +0000)]
Slight style tweaks to the bsearch changest.
Eric Haszlakiewicz [Wed, 4 Mar 2015 03:00:08 +0000 (22:00 -0500)]
Merge pull request #155 from LeSpocky/bsearch
add bsearch for arrays
Eric Haszlakiewicz [Wed, 4 Mar 2015 02:37:02 +0000 (21:37 -0500)]
Merge pull request #156 from jubalh/master
Remove trailing whitespaces
chl [Thu, 5 Feb 2015 00:34:10 +0000 (01:34 +0100)]
Tightening the number parsing algorithm
Some badly formated "numbers" could get partly parsed,
resulting in truncated results instead of raising an
error.
Examples :
'1.2.3' -> (double)1.2
'2015-01-15' -> (int)2015
This patch is not perfect (ex: input can still end with a 'E', which
is forbidden by json.org doc) but should avoid non-sensically
formated input.
Tests added.
Christopher Watford [Fri, 5 Dec 2014 15:27:44 +0000 (10:27 -0500)]
Adds json_config.h.win32 to project. Adds VS2k13 project.
Christopher Watford [Fri, 5 Dec 2014 15:22:36 +0000 (10:22 -0500)]
Fixes #160 'missing header file on windows'
Eric Haszlakiewicz [Sun, 14 Sep 2014 02:18:51 +0000 (22:18 -0400)]
Merge pull request #153 from LeSpocky/doc
improve doc for json_object_to_json_string()
Eric Haszlakiewicz [Sun, 14 Sep 2014 02:18:14 +0000 (22:18 -0400)]
Merge pull request #151 from mjchinn/json_type-comma
Remove json_type enum trailing comma
Eric Haszlakiewicz [Sun, 14 Sep 2014 02:17:57 +0000 (22:17 -0400)]
Merge pull request #150 from ams-cs/master
Fix build using MinGW.
Eric Haszlakiewicz [Sun, 14 Sep 2014 02:14:44 +0000 (22:14 -0400)]
Merge pull request #141 from AlexandruCostache/master
Removed duplicate check in random_seed test - bug #140
Michael Vetter [Tue, 26 Aug 2014 12:48:59 +0000 (14:48 +0200)]
Remove trailing whitespace
Alexander Dahl [Thu, 21 Aug 2014 13:42:50 +0000 (15:42 +0200)]
add bsearch for arrays
Arrays can already be sorted with json_object_array_sort() which uses
qsort() of the standard C library. This adds a counterpart using the
bsearch() from C.
Alexander Dahl [Mon, 18 Aug 2014 08:28:38 +0000 (10:28 +0200)]
improve doc for json_object_to_json_string()
Michael J. Chinn [Sun, 10 Aug 2014 04:46:25 +0000 (00:46 -0400)]
Remove json_type enum trailing comma
Andrew Stubbs [Mon, 4 Aug 2014 10:44:25 +0000 (11:44 +0100)]
Fix build using MinGW.
MinGW requires wincrypt.h.
GCC does not support #pragma comment, which trips Werror.
Christopher Meng [Mon, 28 Jul 2014 11:28:19 +0000 (19:28 +0800)]
SONAME bump
The last json_tokener_errors change affects the binary package, we need a bump to solve the issue.
See [this bug of postgis.](https://bugzilla.redhat.com/show_bug.cgi?id=
1123785 )
Michael Heimpold [Mon, 21 Jul 2014 21:15:45 +0000 (23:15 +0200)]
Introduce json_object_from_fd
Also refactor json_object_from_file to use json_object_from_fd
internally.
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Alexandru Costache [Fri, 4 Jul 2014 08:58:14 +0000 (11:58 +0300)]
Removed duplicate check in random_seed test - bug #140
Eric Haszlakiewicz [Sun, 4 May 2014 02:29:10 +0000 (22:29 -0400)]
Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated.
Eliminate all uses of bits.h within the json-c code.
Eric Haszlakiewicz [Sun, 4 May 2014 02:26:26 +0000 (22:26 -0400)]
Fix the definition of the error_description() macro in bits.h now that json_tokener_errors[] is not exported.
Eric Haszlakiewicz [Sun, 20 Apr 2014 00:33:05 +0000 (20:33 -0400)]
Check for failures when allocating memory; return NULL and set errno=ENOMEM in a few of those cases.
Thanks to Susant Sahani for pointing out some of these.
Eric Haszlakiewicz [Sun, 20 Apr 2014 00:23:54 +0000 (20:23 -0400)]
Reformat some code in json_object.c
Eric Haszlakiewicz [Sun, 20 Apr 2014 00:22:44 +0000 (20:22 -0400)]
Add an empty README file to placate autoconf.
Eric Haszlakiewicz [Sun, 20 Apr 2014 00:11:05 +0000 (20:11 -0400)]
Fix minor typo in README file.
Eric Haszlakiewicz [Sun, 20 Apr 2014 00:10:10 +0000 (20:10 -0400)]
Merge pull request #133 from haneefmubarak/patch-1
Update and rename README to README.md
Eric Haszlakiewicz [Sun, 20 Apr 2014 00:05:06 +0000 (20:05 -0400)]
Merge pull request #132 from pkoretic/master
Remove unused variable 'size'
Haneef Mubarak [Sat, 12 Apr 2014 07:40:05 +0000 (00:40 -0700)]
Update README.md
- code blocks
- slight text changes (rewording)
- pretty printing
Haneef Mubarak [Sat, 12 Apr 2014 07:36:08 +0000 (00:36 -0700)]
Update and rename README to README.md
Markdownify + fix a few errors here and there
Eric Haszlakiewicz [Sat, 12 Apr 2014 00:06:27 +0000 (20:06 -0400)]
Update the release checklist to include calculating the tarball checksums and updating the wiki.
Petar Koretić [Fri, 11 Apr 2014 08:03:40 +0000 (10:03 +0200)]
Remove unused variable 'size'
Eric Haszlakiewicz [Fri, 11 Apr 2014 02:44:13 +0000 (22:44 -0400)]
Bump versions up to 0.12.99 since a 0.12 release was just created.
Eric Haszlakiewicz [Fri, 11 Apr 2014 01:07:20 +0000 (21:07 -0400)]
Update the ChangeLog with the changes for the 0.12 release.
Bump the version in the release checklist.
Michael Clark [Wed, 9 Apr 2014 05:48:21 +0000 (13:48 +0800)]
Patch to address the following issues:
* CVE-2013-6371: hash collision denial of service
* CVE-2013-6370: buffer overflow if size_t is larger than int
Eric Haszlakiewicz [Sun, 23 Mar 2014 01:48:34 +0000 (21:48 -0400)]
Eliminate the deprecated mc_abort() function and MC_ABORT macro.
Eric Haszlakiewicz [Sun, 23 Mar 2014 01:41:24 +0000 (21:41 -0400)]
Make the json_tokener_errors array local. It has been deprecated for a while, and json_tokener_error_desc() should be used instead.
Eric Haszlakiewicz [Sun, 23 Mar 2014 01:40:37 +0000 (21:40 -0400)]
Simplify the tests Makefile to avoid repeating the name of each test.
Eric Haszlakiewicz [Sun, 23 Mar 2014 01:15:41 +0000 (21:15 -0400)]
Rename the "test_case" test to "test_charcase" to make it slightly less confusing.
Eric Haszlakiewicz [Sat, 22 Mar 2014 23:15:01 +0000 (19:15 -0400)]
Fix warnings from autoconf about "...no AC_LANG_SOURCE call detected..." by adding that call within the AC_LINK_IFELSE call.
Eric Haszlakiewicz [Sat, 22 Mar 2014 21:28:40 +0000 (17:28 -0400)]
Issue #103: allow Infinity and -Infinity to be parsed.
Eric Haszlakiewicz [Sat, 22 Mar 2014 17:39:36 +0000 (13:39 -0400)]
Merge pull request #123 from fingon/use-NAN-if-available
nan function requires -lm on some platforms - use of NAN is better, if available
Markus Stenberg [Tue, 18 Mar 2014 14:29:49 +0000 (16:29 +0200)]
nan function requires -lm on some platforms; use of NAN is better, if available.
Eric Haszlakiewicz [Sun, 9 Mar 2014 20:41:33 +0000 (16:41 -0400)]
Issue#102 - add support for parsing "NaN".
Eric Haszlakiewicz [Sun, 2 Mar 2014 17:16:37 +0000 (12:16 -0500)]
Issue#114: check for the presence of isnan and isinf, and provide compat macros on MSCV where _isnan and _finite exist instead.
Eric Haszlakiewicz [Wed, 12 Feb 2014 18:37:17 +0000 (13:37 -0500)]
Merge pull request #121 from TazeTSchnitzel/LowercaseLiterals
Missing lowercase literals test
Andrea Faulds [Wed, 12 Feb 2014 09:52:25 +0000 (09:52 +0000)]
Merge branch 'master' into LowercaseLiterals
Andrea Faulds [Wed, 12 Feb 2014 09:51:51 +0000 (09:51 +0000)]
Missing tests
Eric Haszlakiewicz [Wed, 12 Feb 2014 04:57:24 +0000 (23:57 -0500)]
Eric Haszlakiewicz [Wed, 12 Feb 2014 04:21:50 +0000 (23:21 -0500)]
Merge pull request #112 from TazeTSchnitzel/LowercaseLiterals
Only allow lowercase literals in STRICT mode
Eric Haszlakiewicz [Wed, 12 Feb 2014 04:16:53 +0000 (23:16 -0500)]
Fix Issue #111: Fix off-by-one error when range checking the input to json_tokener_error_desc().
Eric Haszlakiewicz [Wed, 12 Feb 2014 04:13:19 +0000 (23:13 -0500)]
Merge pull request #109 from kdopen/use_strtod
Avoid potential overflow in json_object_get_double
Eric Haszlakiewicz [Wed, 12 Feb 2014 04:06:19 +0000 (23:06 -0500)]
Merge branch 'ebassi-master'
Eric Haszlakiewicz [Wed, 12 Feb 2014 04:05:54 +0000 (23:05 -0500)]
Merge branch 'master' of https://github.com/ebassi/json-c into ebassi-master
Conflicts:
Makefile.am
Eric Haszlakiewicz [Wed, 12 Feb 2014 04:03:46 +0000 (23:03 -0500)]
Ignore and cleanup a few more files that automake creates.
Eric Haszlakiewicz [Wed, 12 Feb 2014 03:55:52 +0000 (22:55 -0500)]
Issue#105: Rename configure.in to configure.ac
Eric Haszlakiewicz [Wed, 12 Feb 2014 03:49:59 +0000 (22:49 -0500)]
Remove the old libjson.so name compatibility support. The library is only created as libjson-c.so now and headers are only installed into the ${prefix}/json-c directory.
Ross Burton [Mon, 18 Nov 2013 16:25:14 +0000 (16:25 +0000)]
build: call AM_PROG_CC_C_O as requested by autoreconf
Andrea Faulds [Thu, 14 Nov 2013 21:13:32 +0000 (21:13 +0000)]
Only allow lowercase literals in STRICT mode
Keith Derrick [Tue, 1 Oct 2013 16:18:51 +0000 (09:18 -0700)]
Avoid potential overflow in json_object_get_double
sscanf is always a potential problem when converting numeric
values as it does not correctly handle over- and underflow
(or at least gives no indication that it has done so).
This change converts json_object_get_double() to use strtod()
according to CERT guidelines.
Emmanuele Bassi [Tue, 17 Sep 2013 12:08:14 +0000 (13:08 +0100)]
Add a check for the -Bsymbolic-functions linker flag
The -Bsymbolic-functions linker flag reduces the amount of PLT jumps in
a shared object, and has a side effect of preventing symbol collisions
in libraries and applications linking against two different shared
objects exposing the same symbol.
While the former is (generally) a performance win, the latter is less
rare than expected. For instance, PulseAudio started linking against
json-c a while ago; now, every project linking against PulseAudio is
leaking json-c symbols. In the GNOME platform, this means that projects
linking against PulseAudio cannot be safely linked against other
libraries depending on the GLib-based JSON parsing libraries JSON-GLib,
because of a symbol conflict. Nominally, this conflict would not be an
issue: libraries and applications do not need to depend on two different
JSON parsing libraries; the symbol leakage, though, ends up causing
either segmentation faults, or weird errors. For further reference,
please see: https://bugzilla.gnome.org/show_bug.cgi?id=703734
JSON-GLib already switched to using -Bsymbolic-functions, but it would
be safe if json-c did the same, wherever the linker flag is available.
Eric Haszlakiewicz [Thu, 12 Sep 2013 02:09:43 +0000 (21:09 -0500)]
Issue #59: change the floating point output format to %.17g so values with more than 6 digits show up in the output.
Eric Haszlakiewicz [Thu, 12 Sep 2013 01:28:56 +0000 (20:28 -0500)]
Use sizeof instead of hard coded values when calling snprintf.
Eric Haszlakiewicz [Thu, 12 Sep 2013 01:27:39 +0000 (20:27 -0500)]
Added a json_object_new_double_s() convenience function to allow an exact string representation of a double to be specified when creating the object and use it in json_tokener_parse_ex() so a re-serialized object more exactly matches the input.
Add json_object_free_userdata() and json_object_userdata_to_json_string() too.
Eric Haszlakiewicz [Sun, 8 Sep 2013 22:30:54 +0000 (17:30 -0500)]
Ignore the test-driver script that is now created, and the script for the test_locale test.
Eric Haszlakiewicz [Sun, 8 Sep 2013 22:23:24 +0000 (17:23 -0500)]
The updated test driver creates .log and .trs files; ignore them.
Eric Haszlakiewicz [Sun, 8 Sep 2013 22:21:52 +0000 (17:21 -0500)]
strndup is gone, remove it from the README file.
Eric Haszlakiewicz [Sun, 8 Sep 2013 20:36:40 +0000 (13:36 -0700)]
Merge pull request #97 from pascal-bach/master
Add const qualifiers to json_object_to_file and json_object_to_file_ext
Eric Haszlakiewicz [Sun, 8 Sep 2013 20:35:28 +0000 (13:35 -0700)]
Merge pull request #96 from rouault/remove_strdnup
Remove redefinition of strndup() which is no longer used in the codebase
Eric Haszlakiewicz [Sun, 8 Sep 2013 20:33:22 +0000 (13:33 -0700)]
Merge pull request #95 from rouault/extern_json_object_set_serializer
Add extern to json_object_set_serializer so that it gets exported (Windows fix)
Eric Haszlakiewicz [Sun, 8 Sep 2013 20:29:05 +0000 (13:29 -0700)]
Merge pull request #94 from remicollet/issue-strict2
more strictness
Eric Haszlakiewicz [Sun, 8 Sep 2013 20:26:56 +0000 (13:26 -0700)]
Merge pull request #93 from tmielika/master
fixing problem that isinf(-Inf) can be 1 or -1
Eric Haszlakiewicz [Sun, 8 Sep 2013 20:20:08 +0000 (13:20 -0700)]
Merge pull request #104 from rouault/fix_json_tokener_error_desc_out_of_bounds_read
Fix potential out-of-bounds read in json_tokener_error_desc
Even Rouault [Sun, 8 Sep 2013 09:31:38 +0000 (11:31 +0200)]
Fix potential out-of-bounds read in json_tokener_error_desc
Found by Coverity. The number of elements of an array 'ar' is found by
sizeof(ar)/sizeof(ar[0]) and not sizeof(ar)
76const char *json_tokener_error_desc(enum json_tokener_error jerr)
77{
78 int jerr_int = (int)jerr;
1. Condition "jerr_int < 0", taking false branch
2. Condition "jerr_int > 112 /* (int)sizeof (gdal_json_tokener_errors) */", taking false branch
79 if (jerr_int < 0 || jerr_int > (int)sizeof(json_tokener_errors))
80 return "Unknown error, invalid json_tokener_error value passed to json_tokener_error_desc()";
CID
1076806 (#1 of 1): Out-of-bounds read (OVERRUN)3. overrun-local: Overrunning array "gdal_json_tokener_errors" of 14 8-byte elements at element index 112 (byte offset 896) using index "jerr" (which evaluates to 112).
81 return json_tokener_errors[jerr];
82}
Remi Collet [Fri, 23 Aug 2013 11:40:01 +0000 (13:40 +0200)]
trailing char not allowed in strict mode
Remi Collet [Wed, 21 Aug 2013 13:41:40 +0000 (15:41 +0200)]
no comment in strict mode
Pascal Bach [Tue, 13 Aug 2013 16:24:23 +0000 (18:24 +0200)]
Update json_util
filename should be passed as const char* to functions
json_object_to_file and json_object_to_file
Even Rouault [Mon, 12 Aug 2013 18:49:19 +0000 (20:49 +0200)]
Remove redefinition of strndup() which is no longer used in the codebase
Even Rouault [Sat, 10 Aug 2013 23:18:17 +0000 (01:18 +0200)]
Add extern to json_object_set_serializer so that it gets exported (Windows fix)
Remi Collet [Tue, 6 Aug 2013 08:41:14 +0000 (10:41 +0200)]
no single-quote string in strict mode
Taneli Mielikainen [Sat, 3 Aug 2013 21:21:58 +0000 (00:21 +0300)]
fixing problem that isinf(-Inf) can be 1 or -1
Eric Haszlakiewicz [Sat, 29 Jun 2013 20:31:18 +0000 (15:31 -0500)]
Eliminate use of MC_ABORT in json-c code, and mark MC_ABORT/mc_abort deprecated.
Also adjust an error message in json_util to make it unique. Fixes #87.