mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-22 22:50:21 +00:00
Appspawn Fuzz用例告警修改
Signed-off-by: 陈其文 <chenqiwen6@huawei.com>
This commit is contained in:
parent
3bd0caa5ef
commit
4853cf195c
@ -20,16 +20,16 @@
|
||||
namespace OHOS {
|
||||
int FuzzAppSpawnClientInit(const uint8_t *data, size_t size)
|
||||
{
|
||||
const char *name = APPSPAWN_SERVER_NAME;
|
||||
std::string serviceName(reinterpret_cast<const char*>(data), size);
|
||||
AppSpawnClientHandle handle = nullptr;
|
||||
return AppSpawnClientInit(name, &handle);
|
||||
return AppSpawnClientInit(serviceName.c_str(), &handle);
|
||||
}
|
||||
|
||||
int FuzzAppSpawnClientDestroy(const uint8_t *data, size_t size)
|
||||
{
|
||||
const char *name = APPSPAWN_SERVER_NAME;
|
||||
std::string serviceName(reinterpret_cast<const char*>(data), size);
|
||||
AppSpawnClientHandle handle = nullptr;
|
||||
if (AppSpawnClientInit(name, &handle) != 0) {
|
||||
if (AppSpawnClientInit(serviceName.c_str(), &handle) != 0) {
|
||||
return -1;
|
||||
}
|
||||
return AppSpawnClientDestroy(handle);
|
||||
@ -277,7 +277,12 @@ namespace OHOS {
|
||||
|
||||
int FuzzGetMaxPermissionIndex(const uint8_t *data, size_t size)
|
||||
{
|
||||
return GetMaxPermissionIndex(nullptr);
|
||||
std::string serviceName(reinterpret_cast<const char*>(data), size);
|
||||
AppSpawnClientHandle handle = nullptr;
|
||||
if (AppSpawnClientInit(serviceName.c_str(), &handle) != 0) {
|
||||
return -1;
|
||||
}
|
||||
return GetMaxPermissionIndex(handle);
|
||||
}
|
||||
|
||||
int FuzzGetPermissionByIndex(const uint8_t *data, size_t size)
|
||||
|
Loading…
Reference in New Issue
Block a user