127 Commits

Author SHA1 Message Date
Max Bruckner
d664199036 cJSON_ConfigurationChangeAllowDataAfterJson 2018-02-03 16:42:58 +01:00
Max Bruckner
7e4ac634c6 cJSON_ConfigurationChangeCaseSensitivity 2018-02-03 16:42:57 +01:00
Max Bruckner
1d9d2e8673 cJSON_ConfigurationChangeFormat 2018-02-03 16:42:57 +01:00
Max Bruckner
c4c52cfe58 cJSON_ConfigurationChangePrebufferSize 2018-02-03 16:42:57 +01:00
Max Bruckner
0474d4d85f cJSON_ConfigurationChangeParseEnd
Add a pointer to an end position of parsing to the cJSON_Configuration
object. (Essentially like return_parse_end, but as offset instead of
pointer).
2018-02-03 16:42:56 +01:00
Max Bruckner
95d333b5cf cJSON_CreateConfiguration, cJSON_ConfigurationChange{Allocators,Userdata} 2018-02-03 16:42:56 +01:00
Max Bruckner
440ba84d08 Add cJSON_Allocators new style allocator struct 2018-02-03 16:42:56 +01:00
Max Bruckner
69f8bb7778 default_configuration: Macro for the internal_configuration defaults 2018-02-03 16:40:49 +01:00
Max Bruckner
99ad8cc64b internal_configuration: Add case_sensitive 2018-02-03 16:40:49 +01:00
Max Bruckner
47f4337604 cJSON_ParseWithOpts: Extract pasrse with internal_configuration
Also introduces a allow_data_after_json property in the internal
configuration.
2018-02-03 16:40:49 +01:00
Max Bruckner
04137f4ed1 Put buffer_size into internal_configuration 2018-02-03 16:40:48 +01:00
Max Bruckner
479909d0a6 Put format into internal_configuration 2018-02-03 16:40:48 +01:00
Max Bruckner
b277cd6a24 Rename internal_hooks -> internal_configuration, cJSON_New_item -> create_item 2018-02-03 16:40:48 +01:00
Max Bruckner
deca87b071 is_nan and is_infinity macros 2018-01-20 15:45:21 +01:00
Max Bruckner
e7d0c1dc37 Tests: Test if the readme examples are working 2017-12-31 01:35:09 +01:00
Max Bruckner
77931e7fc0 cJSON_Add...ToObject: Add tests for failure conditions 2017-12-29 23:26:53 +01:00
Max Bruckner
5865faffa3 Convert cJSON_Add...ToObject macros into functions
These functions return the added object. Functions to add objects and
arrays have also been added.
2017-12-28 23:56:39 +01:00
Max Bruckner
f966409b33 Add tests for cJSON_Add...ToObject macros 2017-12-28 22:56:57 +01:00
Max Bruckner
2a087843e4 Add overrides for BUILD_SHARED_LIBS 2017-11-28 17:16:11 +01:00
Max Bruckner
eb7c681a4b Fix tests when building as static library 2017-11-28 16:44:24 +01:00
Max Bruckner
0476590a0c Update Unity to 2.4.3 2017-11-28 03:15:50 +01:00
Max Bruckner
11844dd5a6 Add cJSON_Create{Array,Object}Reference 2017-11-28 03:06:02 +01:00
Max Bruckner
eaa90a6b74 Add cJSON_CreateStringReference 2017-11-28 02:02:55 +01:00
Max Bruckner
043507872e Update json-patch-tests 2017-11-20 22:04:57 +01:00
Max Bruckner
b2afbd3c9f cJSON_GetStringValue 2017-11-15 18:47:49 +01:00
yangfl
fa00278f66 Remove trailing space 2017-11-04 21:19:15 +08:00
Max Bruckner
97d7347a6e Merge branch 'develop' 2017-10-08 22:05:02 +02:00
Max Bruckner
acf80470f8 Update Unity to version v2.4.2
Merge commit 'b7bfe1e91a0b55d72f849944d5a33b7962d7bf51' into develop
2017-09-12 18:30:07 +02:00
Max Bruckner
d92754cd30 Add valgrind suppressions for ARMv7 2017-09-08 13:25:14 +02:00
rmallins
629c354390 Rewrite test for cJSON_ParseWithOpts() to expect non-null error
pointer in error case and change code to match new expectations.
2017-09-08 01:22:10 +01:00
rmallins
1b2236a9a6 Improve existing tests showing behaviour of Parse and ParseWithOpts functions. 2017-09-08 01:20:52 +01:00
Max Bruckner
469a437e2a Add valgrind suppressions for ARVMv7 ArchlinuxARM 2017-07-15 11:59:47 +02:00
Max Bruckner
954d61e5e7 Fix #189, ensure returns an invalid pointer
If realloc returns NULL, ensure didn't abort but returned
printbuffer.offset instead. If an attacker can control
printbuffer.offset and also make realloc fail at just the right moment,
this would make cJSON potentially write at an arbitrary memory address.
2017-07-12 23:02:31 +02:00
Max Bruckner
5baa77f86c cJSON_Parse{,WithOpts}: Skip UTF-8 (Byte Order Marks) 2017-07-03 22:28:04 +02:00
Max Bruckner
45e1278acb tests/print_number: Add test with 17 digits of precision 2017-06-28 17:28:50 +02:00
Max Bruckner
21733eb02e tests/print_number: Use proper double literals 2017-06-28 17:28:49 +02:00
Max Bruckner
a9ce4e6bbc Add warning -Wswitch-enum 2017-06-28 17:28:49 +02:00
Max Bruckner
4e0c119391 Add warning -Wmissing-variable-declarations 2017-06-28 17:28:49 +02:00
Max Bruckner
18ad8a8770 misc_utils_tests: call all utils function with NULL pointers 2017-06-28 16:01:20 +02:00
Max Bruckner
bdd5ff7ad6 misc_tests: Call all functions with NULL pointers 2017-06-28 14:22:42 +02:00
Max Bruckner
03ba72faec cJSON_Compare: Fix comparison of objects
It did consider two arrays equal if one is a subset of te other one,
which is incorrect.

See #180
2017-06-14 17:48:56 +02:00
Max Bruckner
569aa060c6 cJSON_Compare: Fix comparison of arrays
It did consider two arrays equal if one is a prefix of the other one,
which is incorrect.

See #180
2017-06-14 17:48:56 +02:00
Max Bruckner
bfbd8fe0d8 tests/parse_hex4: Fix GCC 7 compiler warning (fixes #179) 2017-06-04 21:29:14 +02:00
Max Bruckner
82295f9e4f Update Unity 2017-06-04 19:36:46 +02:00
Max Bruckner
9ecc96878f fix #174: cJSON_ReplaceItemInObject doesn't copy name 2017-05-22 22:55:05 +02:00
Max Bruckner
b537ca70a3 old_utils_tests: Remove leftover unused attribute 2017-05-10 01:15:28 +02:00
Max Bruckner
a01267c0a4 Update json-patch-tests 2017-05-02 01:56:12 +02:00
Max Bruckner
e1f6470dae json_patch_tests.c: Use case sensitive functions 2017-05-02 01:54:49 +02:00
Max Bruckner
8b953d1202 Add cJSON_ReplaceItemViaPointer 2017-05-02 01:18:55 +02:00
Max Bruckner
c24c3e0285 Add cJSON_DetachItemViaPointer 2017-05-01 23:58:04 +02:00