modify fuzz compile failed on pc.

Signed-off-by: wangpeng <wangpeng477@huawei.com>
This commit is contained in:
wangpggg 2024-09-24 14:27:18 +08:00
parent c2785f1c5c
commit 2cb3afcfc4
2 changed files with 8 additions and 6 deletions

View File

@ -204,6 +204,9 @@ static int GetNextIterator(napi_value &objFileInfoExporter, FileIteratorEntity *
}
while (!isDone && FilterTrashAndRecentDir(fileInfoEntity->fileInfo.uri)) {
fileInfoEntity = NClass::GetEntityOf<FileInfoEntity>(env, objFileInfoExporter);
if (fileInfoEntity == nullptr) {
return E_GETRESULT;
}
retNVal = NVal::CreateObject(env);
HILOG_DEBUG("TRASH_DIR or RECENT_DIR: %{public}s", fileInfoEntity->fileInfo.uri.c_str());
if (fileIteratorEntity->flag == CALL_LISTFILE) {

View File

@ -33,13 +33,12 @@ ohos_fuzztest("FileAccessExtConnectionFuzzTest") {
"-Wno-unused-variable",
"-fno-omit-frame-pointer",
]
sources = [
"${user_file_service_path}/interfaces/inner_api/file_access/src/file_access_ext_proxy.cpp",
"${user_file_service_path}/services/native/file_access_service/src/file_access_ext_connection.cpp",
"${user_file_service_path}/test/fuzztest/fileaccessextconnection_fuzzer/fileaccessextconnection_fuzzer.cpp",
]
sources = [ "${user_file_service_path}/test/fuzztest/fileaccessextconnection_fuzzer/fileaccessextconnection_fuzzer.cpp" ]
deps = [ "${user_file_service_path}/services:file_access_service" ]
deps = [
"${user_file_service_path}/interfaces/inner_api/file_access:file_access_extension_ability_kit",
"${user_file_service_path}/services:file_access_service",
]
external_deps = [
"ability_base:want",