diff --git a/test/fuzztest/HookMgrAdd_fuzzer/HookMgrAdd_fuzzer.cpp b/test/fuzztest/HookMgrAdd_fuzzer/HookMgrAdd_fuzzer.cpp index a8cbdb424d2cf718e06906dab8b47c24d08bec55..64a5c89c6c92cdb3361e68e637c8ccbd2f2ca1b5 100644 --- a/test/fuzztest/HookMgrAdd_fuzzer/HookMgrAdd_fuzzer.cpp +++ b/test/fuzztest/HookMgrAdd_fuzzer/HookMgrAdd_fuzzer.cpp @@ -27,10 +27,10 @@ namespace OHOS { bool FuzzHookMgrAdd(const uint8_t* data, size_t size) { bool result = false; - std::string str(reinterpret_cast(data), size); - HOOK_MGR *hookMgr = HookMgrCreate(str.c_str()); + int stage = *data; + int prio = *data; - if (!HookMgrAdd(hookMgr, 0, 0, TestHook)) { + if (!HookMgrAdd(NULL, stage, prio, TestHook)) { result = true; } return result;