515d11f55a
default_configuration: Macro for the internal_configuration defaults
2018-03-25 23:32:03 +02:00
ba8fe0f479
internal_configuration: Add case_sensitive
2018-03-25 23:32:03 +02:00
f02f79ecbb
cJSON_ParseWithOpts: Extract pasrse with internal_configuration
...
Also introduces a allow_data_after_json property in the internal
configuration.
2018-03-25 23:32:03 +02:00
7030dc7c5b
Put buffer_size into internal_configuration
2018-03-25 23:32:03 +02:00
27977adc93
Put format into internal_configuration
2018-03-25 23:32:03 +02:00
677f0cb1bb
Rename internal_hooks -> internal_configuration, cJSON_New_item -> create_item
2018-03-25 23:32:03 +02:00
5ed383a0d1
is_nan and is_infinity macros
2018-03-25 13:01:06 +02:00
22a7d04fa0
add_item_to_object: Fix use-after-free when string is aliased
...
If the `string` property of the item that is added is an alias to the
`string` parameter of `add_item_to_object`, and `constant` is false,
`cJSON_strdup` would access the string after it has been freed.
Thanks @hhallen for reporting this in #248 .
2018-03-02 19:49:55 +01:00
11844dd5a6
Add cJSON_Create{Array,Object}Reference
2017-11-28 03:06:02 +01:00
eaa90a6b74
Add cJSON_CreateStringReference
2017-11-28 02:02:55 +01:00
b2afbd3c9f
cJSON_GetStringValue
2017-11-15 18:47:49 +01:00
97d7347a6e
Merge branch 'develop'
2017-10-08 22:05:02 +02:00
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
5baa77f86c
cJSON_Parse{,WithOpts}: Skip UTF-8 (Byte Order Marks)
2017-07-03 22:28:04 +02:00
bdd5ff7ad6
misc_tests: Call all functions with NULL pointers
2017-06-28 14:22:42 +02:00
9ecc96878f
fix #174 : cJSON_ReplaceItemInObject doesn't copy name
2017-05-22 22:55:05 +02:00
8b953d1202
Add cJSON_ReplaceItemViaPointer
2017-05-02 01:18:55 +02:00
c24c3e0285
Add cJSON_DetachItemViaPointer
2017-05-01 23:58:04 +02:00
28570ad095
Add test for cJSON_SetNumberHelper
2017-04-28 14:41:24 +02:00
e0d3a8a265
Limit nesting depth to 1000 and make it configurable.
2017-04-27 01:57:45 +02:00
c45dc12fd7
Tests for typecheck functions
2017-02-26 21:54:01 +01:00
56b819bfbc
tests: test cJSON_GetObjectItem and cJSON_GetObjectItemCaseSensitive
2017-02-21 11:17:08 +01:00
cbbcc91498
tests: cJSON_ArrayForEach
2017-02-21 09:17:49 +01:00