Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
4bcac01a
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
大约 1 年 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4bcac01a
编写于
7月 24, 2023
作者:
O
openharmony_ci
提交者:
Gitee
7月 24, 2023
浏览文件
操作
浏览文件
下载
差异文件
!2141 code secure check
Merge pull request !2141 from wxt/master
上级
2f09d12e
ce95daae
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
5 addition
and
14 deletion
+5
-14
interfaces/innerkits/reboot/init_reboot_innerkits.c
interfaces/innerkits/reboot/init_reboot_innerkits.c
+2
-2
test/benchmark/parameter_benchmark.cpp
test/benchmark/parameter_benchmark.cpp
+3
-0
test/fuzztest/AddRemoteWatcher_fuzzer/AddRemoteWatcher_fuzzer.cpp
...ztest/AddRemoteWatcher_fuzzer/AddRemoteWatcher_fuzzer.cpp
+0
-3
test/fuzztest/AddWatcher_fuzzer/AddWatcher_fuzzer.cpp
test/fuzztest/AddWatcher_fuzzer/AddWatcher_fuzzer.cpp
+0
-3
test/fuzztest/DelRemoteWatcher_fuzzer/DelRemoteWatcher_fuzzer.cpp
...ztest/DelRemoteWatcher_fuzzer/DelRemoteWatcher_fuzzer.cpp
+0
-3
test/fuzztest/DelWatcher_fuzzer/DelWatcher_fuzzer.cpp
test/fuzztest/DelWatcher_fuzzer/DelWatcher_fuzzer.cpp
+0
-3
未找到文件。
interfaces/innerkits/reboot/init_reboot_innerkits.c
浏览文件 @
4bcac01a
...
...
@@ -35,13 +35,13 @@ static int DoRebootByInitPlugin(const char *mode, const char *option)
char
value
[
MAX_REBOOT_OPTION_SIZE
];
int
ret
=
0
;
if
(
mode
!=
NULL
)
{
if
(
(
option
!=
NULL
)
&&
(
strlen
(
option
)
>=
0
)
)
{
if
(
option
!=
NULL
)
{
ret
=
snprintf_s
(
value
,
MAX_REBOOT_OPTION_SIZE
,
MAX_REBOOT_OPTION_SIZE
-
1
,
"reboot,%s:%s"
,
mode
,
option
);
}
else
{
ret
=
snprintf_s
(
value
,
MAX_REBOOT_OPTION_SIZE
,
MAX_REBOOT_OPTION_SIZE
-
1
,
"reboot,%s"
,
mode
);
}
}
else
{
if
(
(
option
!=
NULL
)
&&
(
strlen
(
option
)
>=
0
)
)
{
if
(
option
!=
NULL
)
{
ret
=
snprintf_s
(
value
,
MAX_REBOOT_OPTION_SIZE
,
MAX_REBOOT_OPTION_SIZE
-
1
,
"reboot,%s"
,
option
);
}
else
{
ret
=
snprintf_s
(
value
,
MAX_REBOOT_OPTION_SIZE
,
MAX_REBOOT_OPTION_SIZE
-
1
,
"%s"
,
"reboot"
);
...
...
test/benchmark/parameter_benchmark.cpp
浏览文件 @
4bcac01a
...
...
@@ -84,6 +84,9 @@ struct LocalParameterTestState {
valid
=
true
;
}
LocalParameterTestState
(
const
LocalParameterTestState
&
)
=
delete
;
LocalParameterTestState
&
operator
=
(
const
LocalParameterTestState
&
)
=
delete
;
~
LocalParameterTestState
()
noexcept
{
for
(
int
i
=
0
;
i
<
nprops
;
i
++
)
{
...
...
test/fuzztest/AddRemoteWatcher_fuzzer/AddRemoteWatcher_fuzzer.cpp
浏览文件 @
4bcac01a
...
...
@@ -24,9 +24,6 @@ namespace OHOS {
{
bool
result
=
false
;
std
::
unique_ptr
<
WatcherManager
>
watcherManager
=
std
::
make_unique
<
WatcherManager
>
(
0
,
true
);
if
(
watcherManager
==
nullptr
)
{
return
result
;
}
uint32_t
id
=
static_cast
<
const
uint32_t
>
(
*
data
);
if
(
!
watcherManager
->
AddRemoteWatcher
(
id
,
nullptr
))
{
result
=
true
;
...
...
test/fuzztest/AddWatcher_fuzzer/AddWatcher_fuzzer.cpp
浏览文件 @
4bcac01a
...
...
@@ -24,9 +24,6 @@ namespace OHOS {
{
bool
result
=
false
;
std
::
unique_ptr
<
WatcherManager
>
watcherManager
=
std
::
make_unique
<
WatcherManager
>
(
0
,
true
);
if
(
watcherManager
==
nullptr
)
{
return
result
;
}
std
::
string
str
(
reinterpret_cast
<
const
char
*>
(
data
),
size
);
if
(
!
watcherManager
->
AddWatcher
(
str
,
0
))
{
...
...
test/fuzztest/DelRemoteWatcher_fuzzer/DelRemoteWatcher_fuzzer.cpp
浏览文件 @
4bcac01a
...
...
@@ -24,9 +24,6 @@ namespace OHOS {
{
bool
result
=
false
;
std
::
unique_ptr
<
WatcherManager
>
watcherManager
=
std
::
make_unique
<
WatcherManager
>
(
0
,
true
);
if
(
watcherManager
==
nullptr
)
{
return
result
;
}
uint32_t
id
=
static_cast
<
const
uint32_t
>
(
*
data
);
if
(
!
watcherManager
->
DelRemoteWatcher
(
id
))
{
...
...
test/fuzztest/DelWatcher_fuzzer/DelWatcher_fuzzer.cpp
浏览文件 @
4bcac01a
...
...
@@ -24,9 +24,6 @@ namespace OHOS {
{
bool
result
=
false
;
std
::
unique_ptr
<
WatcherManager
>
watcherManager
=
std
::
make_unique
<
WatcherManager
>
(
0
,
true
);
if
(
watcherManager
==
nullptr
)
{
return
result
;
}
std
::
string
str
(
reinterpret_cast
<
const
char
*>
(
data
),
size
);
if
(
!
watcherManager
->
DelWatcher
(
str
,
0
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录