Eric Haszlakiewicz
bd42b8310d
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
12 years ago
Even Rouault
86dd55a74a
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}
12 years ago
Remi Collet
4039f91cab
trailing char not allowed in strict mode
12 years ago
Remi Collet
87fa32dfe0
no comment in strict mode
12 years ago
Pascal Bach
20e4708c8a
Update json_util
filename should be passed as const char* to functions
json_object_to_file and json_object_to_file
12 years ago
Even Rouault
1a957c2edc
Remove redefinition of strndup() which is no longer used in the codebase
12 years ago
Even Rouault
6c4bb3840c
Add extern to json_object_set_serializer so that it gets exported (Windows fix)
12 years ago
Remi Collet
a07ef3d197
no single-quote string in strict mode
12 years ago
Taneli Mielikainen
c5523a17e8
fixing problem that isinf(-Inf) can be 1 or -1
12 years ago
Eric Haszlakiewicz
b3bce4d594
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 .
12 years ago
Eric Haszlakiewicz
be002fbb96
Issue#84: explicitly remove old headers and include/json directory so creating the compat symlink can work.
12 years ago
Eric Haszlakiewicz
c62965660b
Fix the _MSC_VER check so it compiles on non-windows compilers. Issue#91
12 years ago
Eric Haszlakiewicz
5e8df40523
Mention that libtoolize is needed if you're not using a release tarball.
12 years ago
Eric Haszlakiewicz
d032aad1f4
Minor spell check.
12 years ago
Eric Haszlakiewicz
8b1bdbb94d
Merge pull request #90 from remicollet/issue-strict
in strick mode, number must not start with 0
12 years ago
Eric Haszlakiewicz
98a62a7652
Merge pull request #89 from ayanes/master
Support NaN and Infinity
12 years ago
Eric Haszlakiewicz
b6539d6e90
Merge pull request #88 from weltling/master
Several MSVC fixes
12 years ago
Remi Collet
e9ee4ae18a
in strick mode, number must not start with 0
12 years ago
Adrian Yanes
d086e2018c
Fixes for Infinity and NaN
Although JSON RFC does not support NaN or Infinity
as numeric values ECMA 262 section 9.8.1 defines
how to handle these cases as strings
12 years ago
Anatol Belski
990fa8e3ee
Fix C89 compat needed by MSVC
12 years ago
Anatol Belski
ed819fb926
snprintf definition is needed here, too
12 years ago
Anatol Belski
48ba6b8c06
fixe int32_t definition for VC11
int32_t is nowhere in msvc, so the version check could be even removed
12 years ago
Eric Haszlakiewicz
e48a25cfbb
Issue #76 : use old style comment to allow json_object_iterator.h to build in ansi mode.
12 years ago
Eric Haszlakiewicz
e843616cc6
Fill in the instructions for update the gh-pages branch.
12 years ago
Eric Haszlakiewicz
4207147c24
Bump the versions for the non-release branch; add a placeholder section to the change log.
12 years ago
Eric Haszlakiewicz
20db5a4e84
Fill in a number of missing steps in the release process.
12 years ago
Eric Haszlakiewicz
7ca1e523f0
Merge branch 'master' of https://github.com/json-c/json-c
12 years ago
Eric Haszlakiewicz
0e81b21dc8
Bump up the version in the release checklist to 0.11
12 years ago
Eric Haszlakiewicz
eee744cd7e
Update the changelog with changes since the 0.10 release.
12 years ago
Eric Haszlakiewicz
f1b684971d
Update config.h.in to add the HAVE_SETLOCALE and HAVE_LOCALE_H lines.
12 years ago
Eric Haszlakiewicz
e8161a11bb
Issue #15 : add a way to set a JSON_TOKENER_STRICT flag to forbid commas at the end of arrays and objects.
12 years ago
Eric Haszlakiewicz
889400d946
Merge pull request #73 from ghazel/master
one definition of json_object_object_foreach only works on c99 and later
12 years ago
Greg Hazel
88bf1c9960
one definition of json_object_object_foreach only works on c99 and later
12 years ago
Eric Haszlakiewicz
5ec65e43b2
Merge pull request #71 from WillDignazio/master
Fix Broken Build, Check ADVANCE_CHAR
12 years ago
William Dignazio
32eddd66f5
Fix broken build by using ADVANCE_CHAR macro return.
We forget to check or use the return value of the ADVANCE_CHAR macro,
and upon compilation an error is thrown because of its lack of use. This
patch checks to see if the macro was successful, and if not replaces the
offending character with a replacement.
12 years ago
William Dignazio
bb492d4d69
Rename misnomer POP_CHAR to PEEK_CHAR.
While parsing token data, we use the POP_CHAR macro to 'peek' at
character data. This behaviour is noted in the comments for the macro,
yet the definition is left as 'pop'. Changing to PEEK_CHAR does not
imply that the character being observed is removed.
12 years ago
Eric Haszlakiewicz
b64d5ab966
Merge pull request #70 from tg--/master
rename AM_CONFIG_HEADER to AC_CONFIG_HEADER
12 years ago
Eric Haszlakiewicz
1aa29b655a
Issue #68 : use -std=gnu99 because some versions of gcc seem to think that -std=c99 also implies -ansi, which causes warnings and build breakage.
12 years ago
Thomas Gstädtner
36ec47db49
configure.in: mv AM_CONFIG_HEADER to AC_CONFIG_HEADER
the former has been deprecated and does not work on newer autoconf
versions.
12 years ago
Eric Haszlakiewicz
94aeed2ecd
Include the test_locale test in the tests that run.
12 years ago
Eric Haszlakiewicz
5b36a432c8
Merge branch 'remicollet-issue-float'
Conflicts:
json_util.c
12 years ago
Eric Haszlakiewicz
9b64c05ff9
Mark the "val" variable in json_object_object_foreach as unused so the compiler doesn't complain. Fix warnings in the testReplaceExisting test.
12 years ago
Eric Haszlakiewicz
bfb329223a
Add a runtime check to see if parse_int64 needs to workaround sscanf bugs. If that workaround is not needed parsing is nearly twice as fast.
12 years ago
Eric Haszlakiewicz
ca8b27d183
Enable -Werror and fix a number of minor warnings that existed.
12 years ago
Eric Haszlakiewicz
92d289f5d3
Add a comment briefly describing json_object_object_length()
12 years ago
Eric Haszlakiewicz
c6b399194d
Merge pull request #62 from ghazel/master
json_object_object_length
12 years ago
Eric Haszlakiewicz
ebeb6a40c9
Merge pull request #66 from ichernev/fix-test-parse
Fixed test_parse for \f
12 years ago
Iskren Chernev
78b089bc1e
Fixed test_parse for \f
12 years ago
Greg Hazel
cca74c6de6
add json_object_object_length
12 years ago
Eric Haszlakiewicz
3ae296f694
Merge pull request #60 from ghazel/master
rename _errno
12 years ago