modify fuzz

Signed-off-by: wangpeng <wangpeng477@huawei.com>
This commit is contained in:
wangpggg 2024-11-26 19:42:16 +08:00
parent 39ece81398
commit 7b3354b6d9
4 changed files with 4 additions and 4 deletions

View File

@ -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.");

View File

@ -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;
}

View File

@ -557,6 +557,7 @@ bool CmdGetRootsFuzzTest(shared_ptr<FileAccessExtStub> fileAccessExtStub, const
{
MessageParcel msg;
MessageParcel reply;
msg.WriteBuffer(data, size);
que = {};
que.push(false);

View File

@ -25,6 +25,7 @@ using namespace FileAccessFwk;
bool IsFullMountFuzzTest(const uint8_t *data, size_t size)
{
(void)data;
IsFullMountEnable();
return true;
}