From 748ed804179c103803d33325bb7109ff0af24a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=88=E7=9A=93=E6=9D=B0?= Date: Tue, 23 Jul 2024 03:40:34 +0000 Subject: [PATCH] add fuzz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 师皓杰 --- .../bundlemanagercallbackstub_fuzzer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/fuzztest/bundlemanagercallbackstub_fuzzer/bundlemanagercallbackstub_fuzzer.cpp b/test/fuzztest/bundlemanagercallbackstub_fuzzer/bundlemanagercallbackstub_fuzzer.cpp index 585b5bf7..6a69ea67 100644 --- a/test/fuzztest/bundlemanagercallbackstub_fuzzer/bundlemanagercallbackstub_fuzzer.cpp +++ b/test/fuzztest/bundlemanagercallbackstub_fuzzer/bundlemanagercallbackstub_fuzzer.cpp @@ -16,6 +16,7 @@ #include "bundlemanagercallbackstub_fuzzer.h" #include "bundle/bundle_manager_callback_stub.h" +#include "mock_fuzz_util.h" namespace OHOS { namespace DistributedSchedule { @@ -25,6 +26,7 @@ bool OnQueryInstallationFinishedInnerFuzzTest(const uint8_t* data, size_t size) if ((data == nullptr) || (size < sizeof(int32_t))) { return false; } + FuzzUtil::MockPermission(); std::shared_ptr bundleManager_ = std::make_shared(); uint32_t code = 0; @@ -45,6 +47,7 @@ bool OnQueryInstallationFinishedInnerFuzzTest(const uint8_t* data, size_t size) dataParcel.WriteUint32(versionCode); dataParcel.WriteInt32(missionId); bundleManager_->OnRemoteRequest(code, dataParcel, reply, option); + bundleManager_->OnQueryInstallationFinishedInner(dataParcel, reply); return true; } }