Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
7850741d
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
接近 2 年 前同步成功
通知
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看板
未验证
提交
7850741d
编写于
5月 05, 2022
作者:
O
openharmony_ci
提交者:
Gitee
5月 05, 2022
浏览文件
操作
浏览文件
下载
差异文件
!577 fix: fuzz code adapt rk3568 arm64
Merge pull request !577 from Mupceet/0505fuzz
上级
46752101
327dd36e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
4 deletion
+15
-4
test/fuzztest/systemdumpparameters_fuzzer/systemdumpparameters_fuzzer.cpp
...stemdumpparameters_fuzzer/systemdumpparameters_fuzzer.cpp
+2
-1
test/fuzztest/systemgetparametercommitid_fuzzer/systemgetparametercommitid_fuzzer.cpp
...etercommitid_fuzzer/systemgetparametercommitid_fuzzer.cpp
+4
-1
test/fuzztest/systemgetparametername_fuzzer/systemgetparametername_fuzzer.cpp
...getparametername_fuzzer/systemgetparametername_fuzzer.cpp
+4
-1
test/fuzztest/systemgetparametervalue_fuzzer/systemgetparametervalue_fuzzer.cpp
...tparametervalue_fuzzer/systemgetparametervalue_fuzzer.cpp
+4
-1
test/fuzztest/utils/include/fuzz_utils.h
test/fuzztest/utils/include/fuzz_utils.h
+1
-0
未找到文件。
test/fuzztest/systemdumpparameters_fuzzer/systemdumpparameters_fuzzer.cpp
浏览文件 @
7850741d
...
...
@@ -21,7 +21,8 @@ namespace OHOS {
bool
FuzzSystemDumpParameters
(
const
uint8_t
*
data
,
size_t
size
)
{
CloseStdout
();
SystemDumpParameters
(
reinterpret_cast
<
int
>
(
data
));
int
verbose
=
atoi
(
reinterpret_cast
<
char
*>
(
const_cast
<
uint8_t
*>
(
data
)));
SystemDumpParameters
(
verbose
);
return
true
;
}
}
...
...
test/fuzztest/systemgetparametercommitid_fuzzer/systemgetparametercommitid_fuzzer.cpp
浏览文件 @
7850741d
...
...
@@ -14,6 +14,7 @@
*/
#include "systemgetparametercommitid_fuzzer.h"
#include "fuzz_utils.h"
#include "sys_param.h"
namespace
OHOS
{
...
...
@@ -21,7 +22,9 @@ namespace OHOS {
{
bool
result
=
false
;
uint32_t
commitId
=
0
;
if
(
!
SystemGetParameterCommitId
(
reinterpret_cast
<
ParamHandle
>
(
data
),
&
commitId
))
{
char
*
rest
=
nullptr
;
ParamHandle
handle
=
(
ParamHandle
)
strtoul
(
reinterpret_cast
<
char
*>
(
const_cast
<
uint8_t
*>
(
data
)),
&
rest
,
BASE
);
if
(
!
SystemGetParameterCommitId
(
handle
,
&
commitId
))
{
result
=
true
;
}
return
result
;
...
...
test/fuzztest/systemgetparametername_fuzzer/systemgetparametername_fuzzer.cpp
浏览文件 @
7850741d
...
...
@@ -14,6 +14,7 @@
*/
#include "systemgetparametername_fuzzer.h"
#include "fuzz_utils.h"
#include "sys_param.h"
namespace
OHOS
{
...
...
@@ -21,7 +22,9 @@ namespace OHOS {
{
bool
result
=
false
;
char
buffer
[
PARAM_NAME_LEN_MAX
]
=
{
0
};
if
(
!
SystemGetParameterName
(
reinterpret_cast
<
ParamHandle
>
(
data
),
buffer
,
PARAM_NAME_LEN_MAX
))
{
char
*
rest
=
nullptr
;
ParamHandle
handle
=
(
ParamHandle
)
strtoul
(
reinterpret_cast
<
char
*>
(
const_cast
<
uint8_t
*>
(
data
)),
&
rest
,
BASE
);
if
(
!
SystemGetParameterName
(
handle
,
buffer
,
PARAM_NAME_LEN_MAX
))
{
result
=
true
;
}
return
result
;
...
...
test/fuzztest/systemgetparametervalue_fuzzer/systemgetparametervalue_fuzzer.cpp
浏览文件 @
7850741d
...
...
@@ -14,6 +14,7 @@
*/
#include "systemgetparametervalue_fuzzer.h"
#include "fuzz_utils.h"
#include "sys_param.h"
namespace
OHOS
{
...
...
@@ -22,7 +23,9 @@ namespace OHOS {
bool
result
=
false
;
char
buffer
[
PARAM_CONST_VALUE_LEN_MAX
]
=
{
0
};
uint32_t
len
=
PARAM_CONST_VALUE_LEN_MAX
;
if
(
!
SystemGetParameterValue
(
reinterpret_cast
<
ParamHandle
>
(
data
),
buffer
,
&
len
))
{
char
*
rest
=
nullptr
;
ParamHandle
handle
=
(
ParamHandle
)
strtoul
(
reinterpret_cast
<
char
*>
(
const_cast
<
uint8_t
*>
(
data
)),
&
rest
,
BASE
);
if
(
!
SystemGetParameterValue
(
handle
,
buffer
,
&
len
))
{
result
=
true
;
}
return
result
;
...
...
test/fuzztest/utils/include/fuzz_utils.h
浏览文件 @
7850741d
...
...
@@ -18,5 +18,6 @@
#include <stdint.h>
#include <stdlib.h>
#define BASE 10
void
CloseStdout
(
void
);
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录