Commit Graph

1155 Commits

Author SHA1 Message Date
openharmony_ci d2d5e2b29d !116 merge master into master
add depth check to prevent stack overflow in cJSON_Print (#984)

Created-by: mohaoyuan
Commit-by: mohaoyuan
Merged-by: openharmony_ci
Description: ### 相关的Issue
https://gitcode.com/openharmony/third_party_cJSON/issues/89
  
### 原因(目的、解决的问题等)


### 描述(做了什么,变更了什么)


### 测试用例(新增、改动、可能影响的功能)
    
    


See merge request: openharmony/third_party_cJSON!116
2026-02-28 20:34:00 +08:00
mohaoyuan 0f37a25b0e add depth check to prevent stack overflow in cJSON_Print (#984)
Signed-off-by: mohaoyuan <mohaoyuan@h-partners.com>
2026-02-26 22:12:08 +08:00
openharmony_ci ed51a490e2 !113 merge master into master
补临时蓝区提交

Created-by: mohaoyuan
Commit-by: mohaoyuan
Merged-by: openharmony_ci
Description: ### 相关的Issue

  
### 原因(目的、解决的问题等)


### 描述(做了什么,变更了什么)


### 测试用例(新增、改动、可能影响的功能)
    
    


See merge request: openharmony/third_party_cJSON!113
OpenHarmony-v6.1-Release
2026-01-04 10:20:48 +08:00
mohaoyuan dfacd572c4 update: 更新文件 bundle.json
Signed-off-by: mohaoyuan <mohaoyuan@h-partners.com>
2025-12-25 20:42:40 +08:00
mohaoyuan 43cc398706 增加 bundle.json head用于发布chipsdk_sp
Revert "补临时蓝区提交"

This reverts commit f523361512.

Signed-off-by: mohaoyuan <mohaoyuan@h-partners.com>
2025-12-25 16:42:09 +08:00
mohaoyuan f523361512 补临时蓝区提交
Signed-off-by: mohaoyuan <mohaoyuan@h-partners.com>
2025-12-19 10:13:51 +08:00
openharmony_ci edda7bdbf6 !111 merge master into master
从社区合入版本1.7.19

Created-by: mohaoyuan
Commit-by: mohaoyuan
Merged-by: openharmony_ci
Description: ### 相关的Issue
https://gitcode.com/openharmony/third_party_cJSON/issues/79
  
### 原因(目的、解决的问题等)


### 描述(做了什么,变更了什么)


### 测试用例(新增、改动、可能影响的功能)
    
    


See merge request: openharmony/third_party_cJSON!111
2025-11-11 23:10:32 +08:00
mohaoyuan 781816e405 从社区合入版本1.7.19
Signed-off-by: mohaoyuan <mohaoyuan@h-partners.com>
2025-11-07 16:11:39 +08:00
openharmony_ci 392617f56f !106 修复cJSON_Utils.c文件decode_array_index_from_pointer函数
Merge pull request !106 from 刘永凯/DTS_fixCJSON
2025-09-04 13:22:08 +00:00
刘永凯 a09d067804 修复cJSON_Utils.c文件decode_array_index_from_pointer函数
Signed-off-by: 刘永凯 <liuyongkai2@huawei-partners.com>
2025-09-04 17:03:23 +08:00
openharmony_ci 59290b75b3 !104 Added max recusrion depth for cJSONDuplicate to prevent stack exhausti…
Merge pull request !104 from liukaii/gitee0619
OpenHarmony-v6.0-Release
2025-07-24 11:47:14 +00:00
liukaii dea6d9d184 Added max recusrion depth for cJSONDuplicate to prevent stack exhaustion in case of circular reference
Signed-off-by: liukaii <liukai240@huawei.com>
Change-Id: I8a9429686433c53e14edcd50bbf49a14eb9f9d6c
2025-07-24 15:21:21 +08:00
openharmony_ci f6368e8af5 !103 cjson gn文件整改
Merge pull request !103 from liukaii/gitee0617
2025-06-18 15:00:27 +00:00
liukaii 487a707ab3 cJSON GN文件整改
Signed-off-by: liukaii <liukai240@huawei.com>
Change-Id: If18546b77a43caebf2d3480fd08dc3a5fc5322a1
2025-06-17 20:46:58 +08:00
openharmony_ci dd5d9df2f4 !100 tdd add
Merge pull request !100 from liuyuxiu/master
2025-06-12 07:48:47 +00:00
liuyuxiu fd06c3a5d1 tdd add
Signed-off-by: liuyuxiu <1175395694@qq.com>
2025-06-12 11:15:12 +08:00
openharmony_ci b0c42dbd02 !99 add tdd
Merge pull request !99 from liuyuxiu/master
2025-06-11 08:13:33 +00:00
liuyuxiu 5da3a048ef add tdd
Signed-off-by: liuyuxiu <1175395694@qq.com>
2025-06-11 10:49:04 +08:00
openharmony_ci 4e9aa24de3 !98 bug fix 53154
Merge pull request !98 from liuyuxiu/master
2025-06-10 13:25:11 +00:00
liuyuxiu e5cc5dd84a update tests/parse_examples.c.
Signed-off-by: liuyuxiu <liuyuxiu2@huawei.com>
2025-06-10 11:31:58 +00:00
liuyuxiu 514f53655d bugfix
Signed-off-by: liuyuxiu <1175395694@qq.com>
2025-06-10 15:39:04 +08:00
liuyuxiu 6ccdcd9afd bug fix
Signed-off-by: liuyuxiu <1175395694@qq.com>
2025-06-05 14:54:18 +08:00
openharmony_ci 42ef962989 !97 revert bugfix
Merge pull request !97 from liuyuxiu/master
2025-06-05 06:46:36 +00:00
liuyuxiu d56a296582 revert bugfix
Signed-off-by: liuyuxiu <1175395694@qq.com>
2025-06-05 11:22:30 +08:00
openharmony_ci 6d05770b54 !92 cjson组件1.7.15版本bugfix
Merge pull request !92 from liuyuxiu/master
OpenHarmony-v6.0-Beta1
2025-05-22 09:38:59 +00:00
liuyuxiu 40251b9666 bugfix
Signed-off-by: liuyuxiu <1175395694@qq.com>
2025-05-20 18:14:39 +08:00
openharmony_ci a958a4c53d !88 CVE-2023-26819 漏洞修复
Merge pull request !88 from youbing54/master
2025-05-14 02:38:37 +00:00
youbing54 e2891073e2 IssueNo: https://gitee.com/openharmony/third_party_cJSON/issues/IC750Q
describe: CVE-2023-26819 漏洞修复
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
2025-05-13 16:59:15 +08:00
openharmony_ci a4d4630bd6 !87 回退64位修改
Merge pull request !87 from youbing54/master
2025-05-13 08:10:10 +00:00
youbing54 82d90be219 IssueNo: https://gitee.com/openharmony/third_party_cJSON/issues/IC7ESI
describe: 回退64位修改
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
2025-05-13 14:30:05 +08:00
openharmony_ci 228ab82c03 !85 Revert "fix 【漏洞修复】 CVE-2023-26819"
Merge pull request !85 from youbing54/master
2025-05-13 03:27:23 +00:00
youbing54 8e9d81203b IssueNo: https://gitee.com/openharmony/third_party_cJSON/issues/IC740N
describe: CVE-2023-26819 代码回退
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
2025-05-12 15:34:18 +08:00
openharmony_ci df6b51919d !84 fix 【漏洞修复】 CVE-2023-26819
Merge pull request !84 from 蒋码云/master
2025-05-10 10:13:24 +00:00
jiangtao57 6689549a29 fix 【漏洞修复】 CVE-2023-26819
Signed-off-by: jiangtao57 <jiangtao57@huawei.com>
Change-Id: I34a9b7a2e4800aca7cc91635bd2414639f9c42de
2025-05-09 21:04:13 +08:00
openharmony_ci 383380533b !78 修改license
Merge pull request !78 from youbing54/master
OpenHarmony-v5.1.0-Release
2025-01-16 02:12:18 +00:00
youbing54 1c9f653159 IssueNo: https://gitee.com/openharmony/third_party_cJSON/issues/IBHVHB
describe: 修改license
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
2025-01-15 10:33:53 +08:00
openharmony_ci 9750e409e9 !75 漏洞修复:check for NULL in cJSON_DetachItemViaPointer
Merge pull request !75 from youbing54/master
2024-09-02 02:17:06 +00:00
youbing54 f9fcedd3b9 IssueNo: https://gitee.com/openharmony/third_party_cJSON/issues/IANUKP
describe: check for NULL in cJSON_DetachItemViaPointer
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
2024-08-31 16:36:40 +08:00
openharmony_ci ef9690d18e !73 cJson添加后向保护
Merge pull request !73 from youbing54/master
2024-08-29 08:07:29 +00:00
youbing54 eef2a51aff IssueNo: https://gitee.com/openharmony/third_party_cJSON/issues/IANAZ1
describe: cjson添加后向保护
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
2024-08-29 11:41:57 +08:00
openharmony_ci 0b1c599c8f !71 jsoncpp添加后向保护
Merge pull request !71 from youbing54/master
2024-08-20 08:00:50 +00:00
youbing54 3701afe2a9 IssueNo: https://gitee.com/openharmony/third_party_jsoncpp/issues/IAL5A7
describe: jsoncpp添加后向保护
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
2024-08-20 11:30:13 +08:00
openharmony_ci 1f0243dbd8 !69 代码同步
Merge pull request !69 from youbing54/master
2024-07-22 06:48:31 +00:00
youbing54 f9c6ce31f4 IssueNo: https://gitee.com/openharmony/third_party_cJSON/issues/IAEKV4
describe: Code synchronization
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
2024-07-22 11:13:46 +08:00
openharmony_ci 643d85808e !68 cJSON升级1.7.7版本
Merge pull request !68 from youbing54/master
2024-07-03 08:41:59 +00:00
youbing54 c717f2eb93 IssueNo: https://gitee.com/openharmony/third_party_cJSON/issues/IAA61F
describe: Upgrade cJSON to version 1.7.7
Feature or Bugfix: Bugfix
Binary Source:Yes
Signed-off-by: youbing54<youbing3@huawei.com>
2024-07-03 11:34:53 +08:00
openharmony_ci 64ae6aaf97 !66 合入int64特性的补丁
Merge pull request !66 from borne/br1
2024-06-25 13:59:27 +00:00
borne 87569a8587 feat: add int64 support
Offering: Open Source Institute

This commit adds int64 support for cjson. To enable int64, you need to define the macro ENABLE_INT64. To make it more clear, you need to build cjson like this if you are using makefile:

mkdir build
cd build
cmake -DENABLE_INT64=ON ..
make

This implementation changed the type of valueint in struct cJSON: from int to long long(int64), and added a new flag cJSON_IsInt64.
For a int64 cJSON item, the value of item->type would be cJSON_Number | cJSON_IsInt64.

The existing functions parse_number and print_number can handle int64 now.

Considering we have added a new type cJSON_IsInt64, some new functions have been added:
CJSON_PUBLIC(long long *) cJSON_GetInt64NumberValue(cJSON * const item)
CJSON_PUBLIC(cJSON_bool) cJSON_IsInt64Number(const cJSON * const item)
CJSON_PUBLIC(cJSON *) cJSON_CreateInt64Number(long long integer)
CJSON_PUBLIC(cJSON*) cJSON_AddInt64NumberToObject(cJSON * const object, const char * const name, const long long integer)
CJSON_PUBLIC(long long) cJSON_SetInt64NumberValue(cJSON * const object, const long long integer)

And some existing functions are also adjusted for int64, including parse_number, cJSON_SetNumberHelper, print_number, cJSON_CreateNumber, cJSON_Compare and compare_json(in cJSON_Utils).

Besides the code changes, we have also added some testcases for int64.
These tests will run if ENABLE_INT64 is turned on.

Ref:PeterAlfredLee
https://github.com/DaveGamble/cJSON/pull/689

Signed-off-by: borne <bo.lu@huawei.com>
2024-06-21 13:05:42 +08:00
openharmony_ci e603594778 !60 调用parse_string增加offset判断
Merge pull request !60 from 刘波/master
2024-05-13 09:29:09 +00:00
liubo 14cf937545 Description: 调用parse_string增加offset判断
IssueNo:https://gitee.com/openharmony/third_party_cJSON/issues/I9OUF5
Binary Source:No
Signed-off-by: liubo419 <liubo419@huawei.com>
2024-05-13 14:39:19 +08:00