未验证 提交 3c9ce198 编写于 作者: O openharmony_ci 提交者: Gitee

!36 【3.0分支合入】控制解析层数,防止cJSON库递归解析爆栈风险

Merge pull request !36 from panchengzhong/OpenHarmony-3.0-LTS
......@@ -17,6 +17,7 @@ if (defined(ohos_lite)) {
config("cjson_config") {
include_dirs = [ "." ]
ldflags = [ "-lm" ]
defines = [ "CJSON_NESTING_LIMIT=(128)" ]
}
cjson_sources = [
"cJSON.c",
......@@ -46,6 +47,7 @@ if (defined(ohos_lite)) {
import("//build/ohos.gni")
config("cJSON_config") {
include_dirs = [ "." ]
defines = [ "CJSON_NESTING_LIMIT=(128)" ]
}
ohos_static_library("cjson_static") {
sources = [ "cJSON.c" ]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册