diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index 9c3fbdd3c97bac5f2c195a3b3a75a36bdda8bc82..4ad733626ea21f8766a2458a72c994dda1deca8e 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -26,6 +26,16 @@ file_common_src = [ ] ohos_shared_library("fileio") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" @@ -103,6 +113,16 @@ ohos_shared_library("fileio") { } ohos_shared_library("fs") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" @@ -203,6 +223,16 @@ ohos_shared_library("fs") { } ohos_shared_library("hash") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" @@ -232,6 +262,16 @@ ohos_shared_library("hash") { } ohos_shared_library("file") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" @@ -266,6 +306,16 @@ ohos_shared_library("file") { } ohos_shared_library("statfs") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" @@ -288,6 +338,16 @@ ohos_shared_library("statfs") { } ohos_shared_library("statvfs") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" @@ -310,6 +370,16 @@ ohos_shared_library("statvfs") { } ohos_shared_library("environment") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" @@ -333,6 +403,16 @@ ohos_shared_library("environment") { ] } ohos_shared_library("userdirectory") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" @@ -358,6 +438,16 @@ ohos_shared_library("userdirectory") { ] } ohos_shared_library("securitylabel") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" @@ -384,6 +474,16 @@ ohos_shared_library("securitylabel") { } ohos_shared_library("document") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + subsystem_name = "filemanagement" part_name = "file_api" diff --git a/interfaces/kits/native/BUILD.gn b/interfaces/kits/native/BUILD.gn index 16851a1603243b5f3ae74fa85eb2883ceacf6c0d..e5b3e1003bbca1437f7f0d5bc0f9808f35adc8a6 100644 --- a/interfaces/kits/native/BUILD.gn +++ b/interfaces/kits/native/BUILD.gn @@ -23,6 +23,16 @@ config("remote_uri_config") { } ohos_shared_library("remote_uri_native") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + sources = [ "remote_uri/remote_uri.cpp" ] public_configs = [ ":remote_uri_config" ] diff --git a/utils/filemgmt_libhilog/BUILD.gn b/utils/filemgmt_libhilog/BUILD.gn index e5dc1d3a7b3191d0c7578d7f773d0b5b24636c68..2ba6a641799a9ed497a881b838bb2fbe092cb01f 100644 --- a/utils/filemgmt_libhilog/BUILD.gn +++ b/utils/filemgmt_libhilog/BUILD.gn @@ -21,6 +21,16 @@ config("log_public_config") { } ohos_shared_library("filemgmt_libhilog") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + public_configs = [ ":log_public_config" ] external_deps = [ "hilog:libhilog" ] diff --git a/utils/filemgmt_libn/BUILD.gn b/utils/filemgmt_libn/BUILD.gn index 6ebeaa444d0a8e7ed652b1f7213ea7d07f006537..94e67334e074809366d3f9b36ce7e098b8f80566 100644 --- a/utils/filemgmt_libn/BUILD.gn +++ b/utils/filemgmt_libn/BUILD.gn @@ -25,6 +25,16 @@ config("libn_public_config") { } ohos_shared_library("filemgmt_libn") { + stack_protector ret =true + sanitize = { + integer_overflow = true + ubsan = true + boundary_sanitize = true + cfi = true + cfi_cross_dso = true + debug = false + } + sources = [ "src/n_async/n_async_work_callback.cpp", "src/n_async/n_async_work_promise.cpp",