Alan Wang
f50dafc7d0
fix: potential memory leak in merge_patch() ( #611 )
2021-08-26 14:13:42 +08:00
Alan Wang
6ea4c01e4e
Fix potential core dumped for strrchr ( #546 )
2020-12-31 10:26:39 +08:00
Alanscut
9bf4960cd5
fix a possible dereference of null pointer
2020-10-16 17:06:29 +08:00
Alanscut
c8ca78a3cc
optimize the way to find tail node
2020-09-02 20:23:52 +08:00
Alanscut
8943c73345
comparing double value with DBL_EPSILON
2020-04-02 16:02:24 +08:00
Alanscut
d92c0de7e8
fix encode_string_as_pointer
2020-03-18 16:04:58 +08:00
Alanscut
fa8b454552
correct mistake
2020-01-16 17:10:52 +08:00
Alanscut
4e3335618f
improve compare_double
2019-12-09 10:36:45 +08:00
ChenYuan
ea3a6dcd69
Update cJSON_Utils.c
...
fix typo
2019-12-07 20:24:07 +08:00
Alanscut
51f6b4c07e
Merge branch 'master' into master
2019-12-06 15:14:26 +08:00
Alanscut
500a9db81b
fix memory leak mentioned in issue 414
2019-12-05 11:05:07 +08:00
Paweł Malowany
c9e8a68b00
Fix clang -Wfloat-equal warning
2019-06-10 11:37:03 +02:00
raiden00pl
359567fdde
Undef true and false first also for cJSON_Utils.c
2019-04-28 10:33:44 +02:00
Max Bruckner
563d861f92
cJSON_Utils: sort_lists: Properly split the lists
...
Since `prev` is not used anymore after that by the algorithm it should
have been fine anyways, still splitting it correctly in the first place
is probably a good idea.
Thanks @andysCaplin for the fix!
2018-12-20 18:12:23 +01:00
yuta-oxo
eaec82c3c5
fix bug: sort_list() returns strange results
2018-12-12 15:09:53 +09:00
Bob Kocisko
d26a42af8d
json patch: adding to a subfield of a non-object now fails as expected
2018-03-22 11:10:29 -04:00
Max Bruckner
0d675cb048
MSVC: Disable warning about single line comments in system headers
2017-06-28 17:28:50 +02:00
Max Bruckner
217ab02612
cJSON_Utils: Guard gcc pragmas with a check for __GCC__
2017-06-28 17:28:50 +02:00
Max Bruckner
e872d40223
MSVC: Disable deprecation warnings for C89 functions
...
C89 sadly doesn't provide safe alternatives for strcpy, sprintf and the
like.
2017-06-28 17:28:50 +02:00
Max Bruckner
93227319f0
handle null pointers: cJSONUtils_GeneratePatchesCaseSensitive
2017-06-28 16:00:59 +02:00
Max Bruckner
f0c1b896ba
handle null pointers: cJSONUtils_GeneratePatches
2017-06-28 16:00:41 +02:00
Max Bruckner
2d252ae595
handle null pointer: compose_patch
2017-06-28 16:00:14 +02:00
Max Bruckner
c46c4d1559
handle null pointer: sort_object
2017-06-28 15:59:53 +02:00
Max Bruckner
1af74c8cc1
handle null pointer: get_item_from_pointer
2017-06-28 15:58:58 +02:00
Max Bruckner
9bdf19fde1
handle null pointer: cJSONUtils_FindPointerFromObjectTo
2017-06-28 15:58:22 +02:00
Max Bruckner
b9cc911831
cJSON_Utils: Fix case sensitivity handling when adding to object
2017-06-14 17:48:56 +02:00
Max Bruckner
9abe75e072
cJSON_Utils: Fix get_item_from_pointer
...
Accessing nested arrays didn't work as intended.
2017-06-14 17:48:55 +02:00
crhackos
c0088e1ebe
free() to cJSON_free()
2017-05-06 12:38:10 +08:00
Max Bruckner
66f75619d9
Add cJSONUtils_MergePatchCaseSensitive
2017-05-02 01:30:58 +02:00
Max Bruckner
7f22948eec
Add cJSONUtils_SortObjectCaseSensitive
2017-05-02 01:30:58 +02:00
Max Bruckner
b674519695
Add cJSONUtils_GenerateMergePatchCaseSensitive
2017-05-02 01:30:58 +02:00
Max Bruckner
94057fb069
Add cJSONUtils_ApplyPatchesCaseSensitive
2017-05-02 01:30:58 +02:00
Max Bruckner
3bf2913634
Add cJSONUtils_GeneratePatchesCaseSensitive
2017-05-02 01:30:58 +02:00
Max Bruckner
cd4d7b9b6e
Add cJSONUtils_GetPointerCaseSensitive
2017-05-02 01:30:58 +02:00
Max Bruckner
73823c4b6d
Add get_object_item: configurable case_sensitivity
2017-05-02 01:30:58 +02:00
Max Bruckner
0aaef1a8fa
sort_list: configurable case sensitivity
2017-05-02 01:30:58 +02:00
Max Bruckner
e88be8681d
create_patches: Configurable case sensitivity
2017-05-02 01:30:58 +02:00
Max Bruckner
222686513e
apply_patch: configurable case sensitivity
2017-05-02 01:30:58 +02:00
Max Bruckner
62b08f1336
compare_json: configurable case sensitivity
2017-05-02 01:30:58 +02:00
Max Bruckner
7de847eeea
detach_path: Configurable case sensitivity
2017-05-02 01:30:58 +02:00
Max Bruckner
af9c76e37e
Add get_item_from_pointer: Configurable case sensitivity
2017-05-02 01:30:58 +02:00
Max Bruckner
2f33e8ec9b
Add compare_pointers: Configurable case sensitivity
2017-05-02 01:30:58 +02:00
Max Bruckner
30906a01c0
another compare_strings fix
2017-05-02 01:30:58 +02:00
Max Bruckner
eb017abe72
fix update fix
2017-05-02 01:30:58 +02:00
Max Bruckner
487a8b76a1
fix another compare_strings
2017-05-02 01:30:58 +02:00
Max Bruckner
1d85450883
fix configurable compare_stirings
2017-05-02 01:30:58 +02:00
Max Bruckner
2616db9e92
Add compare_strings: configurable case_sensitivity
2017-05-02 01:30:58 +02:00
Max Bruckner
23cbb173d4
cJSONUtils_SortList -> sort_list
2017-05-02 01:30:58 +02:00
Max Bruckner
a29c468b68
cJSON_CompareToPatch -> create_patches
2017-05-02 01:30:58 +02:00
Max Bruckner
1d65f33d3d
cJSONUtils_GeneratePatch -> compose_patch
2017-05-02 01:30:58 +02:00
Max Bruckner
997ca129a2
cJSONUtils_ApplyPatch -> apply_patch
2017-05-02 01:30:58 +02:00
Max Bruckner
cf1770b0ea
cJSONUtils_Compare -> compare_json
2017-05-02 01:30:58 +02:00
Max Bruckner
aefe2f85ab
cJSONUtils_PatchDetach -> detach_path
2017-05-02 01:30:58 +02:00
Max Bruckner
7f645de322
cJSONUtils_InplaceDecodePointerString -> decode_pointer_inplace
2017-05-02 01:30:58 +02:00
Max Bruckner
e6c239db2b
cJSONUtils_PointerEncodedstrcpy -> encode_string_as_pointer
2017-05-02 01:30:58 +02:00
Max Bruckner
f4d9e2e1a1
cJSON_strcasecmp -> case_insensitive_strcmp
2017-05-02 01:30:58 +02:00
Max Bruckner
e3ed64d56e
cJSON_PointerEncodedstrlen -> pointer_encoded_length
2017-05-02 01:30:58 +02:00
Max Bruckner
6b01dee7ca
Rename cJSONUtils_Pstrcasecmp to case_insensitive_pointer_comparison
...
Also changes the return type to cJSON_bool
2017-05-02 01:30:58 +02:00
Max Bruckner
b73881a388
cJSON_Utils: Add true/false
2017-05-02 01:30:58 +02:00
Max Bruckner
bb2f868126
refactor cJSONUtils_GenerateMergePatch
2017-05-02 01:30:58 +02:00
Max Bruckner
11b8a8cd76
refactor cJSONUtils_MergePatch
2017-05-02 01:30:58 +02:00
Max Bruckner
01d656bebc
refactor cJSONUtils_SortObject
2017-05-02 01:30:58 +02:00
Max Bruckner
7bf62ff4dc
refactor cJSONUtils_SortList
2017-05-02 01:30:58 +02:00
Max Bruckner
f030058183
refactor cJSONUtils_GeneratePatches
2017-05-02 01:30:58 +02:00
Max Bruckner
a67c24c451
refactor cJSONUtils_CompareToPatch
2017-05-02 01:30:58 +02:00
Max Bruckner
512c313111
refactor cJSONUtils_AddPatchToArray
2017-05-02 01:30:58 +02:00
Max Bruckner
e591d4173a
refactor cJSONUtils_GeneratePatch
2017-05-02 01:30:58 +02:00
Max Bruckner
bde341edd8
refactor cJSONUtils_ApplyPatches
2017-05-02 01:30:58 +02:00
Max Bruckner
48c97985d6
refactor cJSONUtils_ApplyPatch
2017-05-02 01:30:58 +02:00
Max Bruckner
63db67bfeb
refactor cJSONUtils_Compare
2017-05-02 01:30:58 +02:00
Max Bruckner
2040ce9004
refactor cJSONUtils_PatchDetach
2017-05-02 01:30:58 +02:00
Max Bruckner
4ba6bafe34
refactor cJSONUtils_InplaceDecodePointerString
2017-05-02 01:30:58 +02:00
Max Bruckner
378a333ee2
refactor cJSONUtils_GetPointer
2017-05-02 01:30:58 +02:00
Max Bruckner
4642d6575f
refactor decode_array_index_from_pointer
2017-05-02 01:30:58 +02:00
Max Bruckner
4932c80f26
refactor cJSONUtils_FindPointerFromObjectTo
2017-05-02 01:30:58 +02:00
Max Bruckner
674a678819
refactor cJSONUtils_PointerEncodedstrcpy
2017-05-02 01:30:58 +02:00
Max Bruckner
b8e3673d0f
refactor cJSONUtils_PointerEncodedstrlen
2017-05-02 01:30:58 +02:00
Max Bruckner
b16bcc3c19
refactor cJSONUtils_Pstrcasecmp
2017-05-02 01:30:58 +02:00
Max Bruckner
44d313212b
refactor cJSONUtils_strcasecmp
2017-05-02 01:30:58 +02:00
Max Bruckner
055c7007e5
refactor cJSONUtils_strdup
2017-05-02 01:30:58 +02:00
Max Bruckner
ee3c3bc80e
cJSONUtils_GeneratePatches: Fix multiple removes in arrays
2017-04-27 21:32:18 +02:00
Max Bruckner
609bb75421
cJSON_Utils: Use cJSON_free and cJSON_malloc
2017-04-12 21:28:31 +02:00
Max Bruckner
134ebf5e89
cJSONUtils_ApplyPatches: Handle replacement of root
2017-04-12 20:50:04 +02:00
Max Bruckner
d67b008d4b
decode_array_index_from_pointer: parse manually
...
This allows checking for leading zeroes and invalid characters after the index
2017-04-12 12:06:27 +02:00
Max Bruckner
c66342d871
cJSON_Utils: Use enum for opcode
2017-04-12 11:36:14 +02:00
Max Bruckner
c960b2b853
cJSON_Utils: Fix size_t support of cJSONUtils_GetPointer
2017-04-12 11:21:48 +02:00
Max Bruckner
3056d85f01
cJSON_Utils: Use new helper function
2017-04-12 11:21:21 +02:00
Max Bruckner
b470d918f3
cJSONUtils: add decode_array_index_from_pointer as common helper function
2017-04-12 11:07:21 +02:00
Max Bruckner
8efb287ae2
cJSONUtils_ApplyPatches: Fail if removal failed
2017-04-12 10:44:29 +02:00
Max Bruckner
a1602f484b
cJSONUtils_ApplyPatches: Don't accept invalid array indices
2017-04-12 10:34:15 +02:00
Max Bruckner
d058a9cd8f
cJSON_ApplyPatches: Don't allow adding to array out of bounds
2017-04-11 17:40:43 +02:00
Max Bruckner
62ba68fc7d
cJSONUtils_ApplyPatches: Fix not accepting arrays
...
This was completely broken, arrays weren't accepted.
2017-04-11 16:38:51 +02:00
Max Bruckner
281df6997c
Update copyright
2017-04-08 17:56:27 +02:00
Max Bruckner
795c3acabe
cJSON_Utils: Fix potential null pointer dereference
...
Found by coverity
2017-04-05 17:36:25 +02:00
Max Bruckner
466eb8e3f8
Fix wconversion with old gcc (e.g. 4.3)
2017-03-18 17:52:04 +01:00
Max Bruckner
5f783fff11
cJSON_Utils: Add gcc pragma to use default visibility for system headers
2017-03-03 00:45:50 +01:00
Max Bruckner
b056d7cb74
Add -Wcomma compiler flag
2017-03-01 11:57:06 +01:00
Max Bruckner
024f690289
Merge pull request #116 from mjerris/fschanges
...
add CJSON_DECLARE macros to support gcc visibility and windows dllexport
2017-02-27 21:51:55 +01:00
Mike Jerris
039b1cc653
add CJSON_PUBLIC macro to public functions to support visibility and dllimport/dllexport
2017-02-27 13:47:06 -06:00
Max Bruckner
ed8dc53699
cJSON_Utils: Use new typecheck functions
2017-02-26 21:26:34 +01:00