Nicolas Badoux
12c4bf1986
Wrong counter increment
2 months ago
Nicolas Badoux
9d1b229086
Added max recusrion depth for cJSONDuplicate to prevent stack exhaustion in case of circular reference
2 months ago
Nicolas Badoux
078c4e6c53
Free mem in cjson_set_valuestring_should_return_null_if_strings_overlap
2 months ago
Nicolas Badoux
4f4d7f70c2
CJSON_SetValuestring: better test for overlapping string
2 months ago
Nicolas Badoux
b47edc4750
CJSON_SetValuestring: add test for overlapping string
2 months ago
Nicolas Badoux
d6d5449e1f
fix #881 , check overlap before calling strcpy in cJSON_SetValuestring
3 months ago
Nicolas Badoux
a78d975537
cJSON_DetachItemViaPointer: added test and fix for check for null in item->prev
2 months ago
Nicolas Badoux
f28a468e3b
Check for NULL in cJSON_DetachItemViaPointer
3 months ago
Alanscut
424ce4ce96
Revert "feat: add tests for #842" to fix test failures
This reverts commit 5b502cdbfb
.
Related to #860
5 months ago
Shaun Case
324973008c
Fix spelling errors found by CodeSpell. See https://github.com/codespell-project/codespell
7 months ago
DL6ER
8a334b0140
Fix indentation (should use spaces)
Signed-off-by: DL6ER <dl6er@dl6er.de>
11 months ago
Alanscut
acc76239be
add contributors
6 months ago
Alanscut
76be8fcf15
Release 1.7.18
6 months ago
Alanscut
5b502cdbfb
feat: add tests for #842
Add some tests for setting NULL to deallocated pointers
releated to #842 and #833
6 months ago
maebex
542fb0eadd
Set free'd pointers to NULL whenever they are not reassigned immediately after
7 months ago
Alanscut
a20be7996d
fix: remove misused optimization flag -01
related to #850
6 months ago
orri
3ef4e4e730
Fix heap buffer overflow
Fixes #800
6 months ago
orri
826cd6f842
Add test for heap buffer overflow
From #800
6 months ago
orri
98f9eb0412
Remove non-functional list handling of compiler flags
6 months ago
Alanscut
19396a49a6
update comments and add tests for cJSON_SetValuestring
6 months ago
Alanscut
5671646e97
fix: fix incorrect name in security.md
Related to #845
6 months ago
Alan Wang
66e9dff670
Create SECURITY.md
6 months ago
Up-wind
7e4d5dabe7
Add NULL check to cJSON_SetValuestring()
If the valuestring passed to cJSON_SetValuestring is NULL, a null pointer dereference will happen.
This commit adds the NULL check of valuestring before it is dereferenced.
8 months ago
Alanscut
87d8f0961a
Release 1.7.17
update version to 1.7.17
11 months ago
Lee
f66cbab4bf
fix error in null checkings ( #810 )
fixes #802 and #803
11 months ago
Lee
60ff122ef5
add NULL checkings ( #809 )
* add NULL checks in cJSON_SetValuestring
Fixes #803(CVE-2023-50472)
* add NULL check in cJSON_InsertItemInArray
Fixes #802(CVE-2023-50471)
* add tests for NULL checks
add tests for NULL checks in cJSON_InsertItemInArray and cJSON_SetValuestring
11 months ago
Alan Wang
cb8693b058
Release 1.7.16 ( #770 )
* Update version to 1.7.16
* Update contributors
1 year ago
Alan Wang
545710e3bf
upgrade clang to fix actions error ( #768 )
Actions builds are failing because clang-8 is failing to be installed. Upgrade clang-8 to clang-14 to fix this.
1 year ago
MaxBrandtner
543c28869e
Add meson documentation ( #761 )
1 year ago
hopper-vul
766dd9d590
Fix a null pointer crash in cJSON_ReplaceItemViaPointer ( #726 )
If the parent passed in cJSON_ReplaceItemViaPointer has not a child, which means parent->child is null, a null pointer dereference crash will be happened inside cJSON_ReplaceItemViaPointer.
This commit adds the NULL check of `parent->child` beforehand to inform user such incorrect usage.
Signed-off-by: hopper-vul <hopper.vul@gmail.com>
1 year ago
Junbo Zheng
b45f48e600
fix: add allocate check for replace_item_in_object ( #675 )
Signed-off-by: Junbo Zheng <zhengjunbo1@xiaomi.com>
3 years ago
Stoian Ivanov
a6424b85dd
feat: add cJSON_SetBoolValue and test ( #639 )
* cJSON_SetBoolValue plus test
* cJSON_Invalid insted of just 0
* Update tests/misc_tests.c
* VSCode standard C formater applied
Co-authored-by: Alan Wang <wp_scut@163.com>
3 years ago
mohawk2
3cecc40466
docs: Fix README typo ( #664 )
3 years ago
Randy
2fc55f6793
chore: add CIFuzz integration ( #437 )
* CIFuzz integration
* Rename main.yml to ci-fuzz.yml
3 years ago
Tony Langhammer
c7025b093a
chore: ignore all .dylib files ( #628 )
This fixes some .dylib files being flagged as added when compiled e.g. `libcjson.dylib.1.7.14`
3 years ago
10km
e7ebe77ebf
fix: 'cjson_utils-static' target not exist( #625 )
* Update CMakeLists.txt
fix the bug:when build with cmake using option '-DBUILD_SHARED_AND_STATIC_LIBS=ON -DENABLE_CJSON_UTILS=ON', build sucess,
but use cmake comand 'find_package(cjson CONFIG)', 'cjson_utils' target is available,but 'cjson_utils-static' target not exist.
3 years ago
Andy
61eb84d991
add an option for ENABLE_CJSON_VERSION_SO in CMakeLists.txt ( #534 )
Co-authored-by: m00209177 <malihu@huawei.com>
3 years ago
AlexanderVasiljev
d321fa9e6e
fix: print int without decimal places ( #630 )
3 years ago
Alan Wang
203a0dec6f
chore: ignore *.lst/*.lss file ( #623 )
3 years ago
Joshua Arulsamy
c77a688927
build: Bump cmake version and use new version syntax ( #587 )
Co-authored-by: Alan Wang <wp_scut@163.com>
3 years ago
Alan Wang
e5dbaee131
docs: update comment ( #622 )
3 years ago
SuperHuan
189dcde644
fix: add cmake_policy to CMakeLists.txt ( #613 )
Use the cmake_policy() command to set CMP0054 to NEW explicitly.
3 years ago
Sayan Bandyopadhyay
b9eff8b02a
fix: for issue #569 , now use the guard to turn it off ( #617 )
3 years ago
Alan Wang
f50dafc7d0
fix: potential memory leak in merge_patch() ( #611 )
3 years ago
Alan Wang
d348621ca9
chore: update version and changelog ( #610 )
3 years ago
Alan Wang
744e47353a
fix: remove redundant condition ( #605 )
3 years ago
Dimitri Papadopoulos Orfanos
7795249dd4
Typos found by codespell ( #607 )
3 years ago
CoffeeTableEspresso
324a6ac9a9
Update .gitattributes ( #544 )
4 years ago
Alan Wang
6ea4c01e4e
Fix potential core dumped for strrchr ( #546 )
4 years ago
Jordan IMBERT
9226e4ed8c
Remove always true condition in cJSON.c ( #539 )
4 years ago