mirror of
https://gitee.com/openharmony/filemanagement_user_file_service
synced 2024-12-04 05:41:30 +00:00
modify fuzz
Signed-off-by: wangpeng <wangpeng477@huawei.com>
This commit is contained in:
parent
39ece81398
commit
7b3354b6d9
@ -137,10 +137,7 @@ bool CreatorFuzzTest(const uint8_t* data, size_t size)
|
||||
|
||||
bool CheckDataAndHelper(const uint8_t* data, size_t size, shared_ptr<FileAccessHelper>& helper)
|
||||
{
|
||||
if ((data == nullptr) || (size <= 0)) {
|
||||
HILOG_ERROR("parameter data is nullptr or parameter size <= 0.");
|
||||
return false;
|
||||
}
|
||||
(void)data;
|
||||
helper = GetFileAccessHelper();
|
||||
if (helper == nullptr) {
|
||||
HILOG_ERROR("GetFileAccessHelper return nullptr.");
|
||||
|
@ -264,6 +264,7 @@ bool CmdGetRootsFuzzTest(shared_ptr<FileAccessExtStub> fileAccessExtStub, const
|
||||
MessageParcel msg;
|
||||
MessageParcel reply;
|
||||
|
||||
msg.WriteBuffer(data, size);
|
||||
fileAccessExtStub->CmdGetRoots(msg, reply);
|
||||
return true;
|
||||
}
|
||||
|
@ -557,6 +557,7 @@ bool CmdGetRootsFuzzTest(shared_ptr<FileAccessExtStub> fileAccessExtStub, const
|
||||
{
|
||||
MessageParcel msg;
|
||||
MessageParcel reply;
|
||||
msg.WriteBuffer(data, size);
|
||||
|
||||
que = {};
|
||||
que.push(false);
|
||||
|
@ -25,6 +25,7 @@ using namespace FileAccessFwk;
|
||||
|
||||
bool IsFullMountFuzzTest(const uint8_t *data, size_t size)
|
||||
{
|
||||
(void)data;
|
||||
IsFullMountEnable();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user