From 30ad7cc11c3348d82247441863f51955b3d13f51 Mon Sep 17 00:00:00 2001 From: yanhuan Date: Fri, 27 Jun 2025 16:52:48 +0800 Subject: [PATCH] =?UTF-8?q?dialogsessionmanager=20fuzz=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yanhuan --- test/fuzztest/BUILD.gn | 6 + test/fuzztest/ability_fuzz_util.h | 305 ++++++++++++++++++ .../dialogsessionmanagerfifth_fuzzer/BUILD.gn | 101 ++++++ .../corpus/init | 16 + .../dialogsessionmanagerfifth_fuzzer.cpp | 58 ++++ .../dialogsessionmanagerfifth_fuzzer.h | 21 ++ .../project.xml | 25 ++ .../dialogsessionmanagerfirst_fuzzer/BUILD.gn | 101 ++++++ .../corpus/init | 16 + .../dialogsessionmanagerfirst_fuzzer.cpp | 78 +++++ .../dialogsessionmanagerfirst_fuzzer.h | 21 ++ .../project.xml | 25 ++ .../BUILD.gn | 101 ++++++ .../corpus/init | 16 + .../dialogsessionmanagerfourth_fuzzer.cpp | 54 ++++ .../dialogsessionmanagerfourth_fuzzer.h | 21 ++ .../project.xml | 25 ++ .../BUILD.gn | 101 ++++++ .../corpus/init | 16 + .../dialogsessionmanagersecond_fuzzer.cpp | 57 ++++ .../dialogsessionmanagersecond_fuzzer.h | 21 ++ .../project.xml | 25 ++ .../dialogsessionmanagerthird_fuzzer/BUILD.gn | 101 ++++++ .../corpus/init | 16 + .../dialogsessionmanagerthird_fuzzer.cpp | 54 ++++ .../dialogsessionmanagerthird_fuzzer.h | 21 ++ .../project.xml | 25 ++ 27 files changed, 1427 insertions(+) create mode 100644 test/fuzztest/dialogsessionmanagerfifth_fuzzer/BUILD.gn create mode 100644 test/fuzztest/dialogsessionmanagerfifth_fuzzer/corpus/init create mode 100644 test/fuzztest/dialogsessionmanagerfifth_fuzzer/dialogsessionmanagerfifth_fuzzer.cpp create mode 100644 test/fuzztest/dialogsessionmanagerfifth_fuzzer/dialogsessionmanagerfifth_fuzzer.h create mode 100644 test/fuzztest/dialogsessionmanagerfifth_fuzzer/project.xml create mode 100644 test/fuzztest/dialogsessionmanagerfirst_fuzzer/BUILD.gn create mode 100644 test/fuzztest/dialogsessionmanagerfirst_fuzzer/corpus/init create mode 100644 test/fuzztest/dialogsessionmanagerfirst_fuzzer/dialogsessionmanagerfirst_fuzzer.cpp create mode 100644 test/fuzztest/dialogsessionmanagerfirst_fuzzer/dialogsessionmanagerfirst_fuzzer.h create mode 100644 test/fuzztest/dialogsessionmanagerfirst_fuzzer/project.xml create mode 100644 test/fuzztest/dialogsessionmanagerfourth_fuzzer/BUILD.gn create mode 100644 test/fuzztest/dialogsessionmanagerfourth_fuzzer/corpus/init create mode 100644 test/fuzztest/dialogsessionmanagerfourth_fuzzer/dialogsessionmanagerfourth_fuzzer.cpp create mode 100644 test/fuzztest/dialogsessionmanagerfourth_fuzzer/dialogsessionmanagerfourth_fuzzer.h create mode 100644 test/fuzztest/dialogsessionmanagerfourth_fuzzer/project.xml create mode 100644 test/fuzztest/dialogsessionmanagersecond_fuzzer/BUILD.gn create mode 100644 test/fuzztest/dialogsessionmanagersecond_fuzzer/corpus/init create mode 100644 test/fuzztest/dialogsessionmanagersecond_fuzzer/dialogsessionmanagersecond_fuzzer.cpp create mode 100644 test/fuzztest/dialogsessionmanagersecond_fuzzer/dialogsessionmanagersecond_fuzzer.h create mode 100644 test/fuzztest/dialogsessionmanagersecond_fuzzer/project.xml create mode 100644 test/fuzztest/dialogsessionmanagerthird_fuzzer/BUILD.gn create mode 100644 test/fuzztest/dialogsessionmanagerthird_fuzzer/corpus/init create mode 100644 test/fuzztest/dialogsessionmanagerthird_fuzzer/dialogsessionmanagerthird_fuzzer.cpp create mode 100644 test/fuzztest/dialogsessionmanagerthird_fuzzer/dialogsessionmanagerthird_fuzzer.h create mode 100644 test/fuzztest/dialogsessionmanagerthird_fuzzer/project.xml diff --git a/test/fuzztest/BUILD.gn b/test/fuzztest/BUILD.gn index bc7fdc1a5ae..b6fb058b110 100644 --- a/test/fuzztest/BUILD.gn +++ b/test/fuzztest/BUILD.gn @@ -303,6 +303,12 @@ group("fuzztest") { "deeplinkreserveconfig_fuzzer:fuzztest", "delegatordoabilityforeground_fuzzer:fuzztest", "dialogsessioninfo_fuzzer:fuzztest", + "dialogsessionmanager_fuzzer", + "dialogsessionmanagerfirst_fuzzer", + "dialogsessionmanagersecond_fuzzer", + "dialogsessionmanagerthird_fuzzer", + "dialogsessionmanagerfourth_fuzzer", + "dialogsessionmanagerfifth_fuzzer", "disposedobserver_fuzzer:fuzztest", "doabilitybackground_fuzzer:fuzztest", "doabilityforeground_fuzzer:fuzztest", diff --git a/test/fuzztest/ability_fuzz_util.h b/test/fuzztest/ability_fuzz_util.h index 07a226cddc7..883c3a776e8 100644 --- a/test/fuzztest/ability_fuzz_util.h +++ b/test/fuzztest/ability_fuzz_util.h @@ -26,6 +26,8 @@ #include "bundle_user_info.h" #include "extract_insight_intent_profile.h" #include "keep_alive_process_manager.h" +#include "want.h" +#include "want_params_wrapper.h" namespace OHOS { namespace AppExecFwk { @@ -218,6 +220,309 @@ void GetRandomKeepAliveAppInfo(FuzzedDataProvider& fdp, AppInfo& info) info.instanceKey = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); info.bundleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); } + +void GetRandomAbilityRequestInfo(FuzzedDataProvider& fdp, AbilityRequestInfo& info) +{ + Want want; + sptr callerToken = nullptr; + GetRandomAbilityInfo(fdp, info.info); + GetRandomResourceInfo(fdp, info.applicationInfo); + info.startRecnet = fdp.ConsumeBool(); +} + +void GetRandomAbilityInfo(FuzzedDataProvider& fdp, AbilityInfo& info) +{ + info.name = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.label = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.description = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.iconPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.labelId = fdp.ConsumeIntegral(); + info.descriptionId = fdp.ConsumeIntegral(); + info.iconId = fdp.ConsumeIntegral(); + info.theme = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.visible = fdp.ConsumeBool(); + info.kind = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.AbilityType = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.ExtensionAbilityType = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.DisplayOrientation = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.LaunchMode = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.srcPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.srcLanguage = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.permissions = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.process = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.deviceTypes = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.deviceCapabilities = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.uri = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.targetAbility = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + GetRandomApplicationInfo(fdp, info.applicationInfo) + info.isLauncherAbility = fdp.ConsumeBool(); + info.isNativeAbility = fdp.ConsumeBool(); + info.enabled = fdp.ConsumeBool(); + info.supportPipMode = fdp.ConsumeBool(); + info.formEnabled = fdp.ConsumeBool(); + info.removeMissionAfterTerminate = fdp.ConsumeBool(); + info.readPermission = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.writePermission = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.configChanges = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.formEntity = fdp.ConsumeIntegral(); + info.minFormHeight = fdp.ConsumeIntegral(); + info.defaultFormHeight = fdp.ConsumeIntegral(); + info.minFormWidth = fdp.ConsumeIntegral(); + info.defaultFormWidth = fdp.ConsumeIntegral(); + info.MetaData = static_cast(fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH)); + info.backgroundModes = fdp.ConsumeIntegral(); + info.SkillUriForAbilityAndExtension = static_cast(fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH)); + info.package = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.bundleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.moduleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.applicationName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.codePath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.resourcePath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.hapPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.srcEntrance = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.MetaData = static_cast(fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH)); + info.isModuleJson = fdp.ConsumeBool(); + info.isStageBasedModel = fdp.ConsumeBool(); + info.continuable = fdp.ConsumeBool(); + info.priority = fdp.ConsumeIntegral(); + info.startWindow = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.startWindowIcon = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.startWindowIconId = fdp.ConsumeIntegral(); + info.startWindowBackground = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.startWindowBackgroundId = fdp.ConsumeIntegral(); + info.preferMultiWindowOrientation = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.excludeFromMissions = fdp.ConsumeBool(); + info.unclearableMission = fdp.ConsumeBool(); + info.excludeFromDock = fdp.ConsumeBool(); + info.recoverable = fdp.ConsumeBool(); + info.isolationProcess = fdp.ConsumeBool(); + info.LinkType = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.orientationId = fdp.ConsumeIntegral(); + info.startWindowId = fdp.ConsumeIntegral(); + info.appIndex = fdp.ConsumeIntegral(); + info.SupportWindowMode = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.continueType = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.continueBundleNames = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.maxWindowRatio = fdp.ConsumeIntegral(); + info.minWindowRatio = fdp.ConsumeIntegral(); + info.maxWindowWidth = fdp.ConsumeIntegral(); + info.minWindowWidth = fdp.ConsumeIntegral(); + info.maxWindowHeight = fdp.ConsumeIntegral(); + info.minWindowHeight = fdp.ConsumeIntegral(); + GetRandomStartWindowResourceInfo(fdp, info.resourceInfo); + info.CompileMode = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.originalBundleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.appName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.privacyUrl = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.privacyName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.downloadUrl = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.versionName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.className = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.originalClassName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.uriPermissionMode = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.uriPermissionPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.packageSize = fdp.ConsumeIntegral(); + info.multiUserShared = fdp.ConsumeBool(); + info.grantPermission = fdp.ConsumeBool(); + info.directLaunch = fdp.ConsumeBool(); + info.AbilitySubType = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.libPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.deviceId = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.installTime = fdp.ConsumeIntegral(); + info.supportExtNames = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.supportMimeTypes = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); +} + +void GetRandomStartWindowResourceInfo(FuzzedDataProvider& fdp, ResourceInfo& resourceInfo) +{ + info.startWindowAppIconId = fdp.ConsumeIntegral(); + info.startWindowIllustrationId = fdp.ConsumeIntegral(); + info.startWindowBrandingImageId = fdp.ConsumeIntegral(); + info.startWindowBackgroundColorId = fdp.ConsumeIntegral(); + info.startWindowBackgroundImageId = fdp.ConsumeIntegral(); + info.startWindowBackgroundImageFit = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); +} + +void GetRandomApplicationInfo(FuzzedDataProvider& fdp, ApplicationInfo& applicationInfo) +{ + info.name = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.bundleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.versionCode = fdp.ConsumeIntegral(); + info.versionName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.minCompatibleVersionCode = fdp.ConsumeIntegral(); + info.apiCompatibleVersion = fdp.ConsumeIntegral(); + info.apiTargetVersion = fdp.ConsumeIntegral(); + info.crowdtestDeadline = fdp.ConsumeIntegral(); + info.iconPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.iconId = fdp.ConsumeIntegral(); + GetRandomResourceInfo(fdp, info.resourceInfo); + info.label = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.labelId = fdp.ConsumeIntegral(); + GetRandomResourceInfo(fdp, info.resourceInfo); + info.description = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.descriptionId = fdp.ConsumeIntegral(); + GetRandomResourceInfo(fdp, info.resourceInfo); + info.keepAlive = fdp.ConsumeBool(); + info.removable = fdp.ConsumeBool(); + info.singleton = fdp.ConsumeBool(); + info.userDataClearable = fdp.ConsumeBool(); + info.allowAppRunWhenDeviceFirstLocked = fdp.ConsumeBool(); + info.accessible = fdp.ConsumeBool(); + info.runningResourcesApply = fdp.ConsumeBool(); + info.associatedWakeUp = fdp.ConsumeBool(); + info.hideDesktopIcon = fdp.ConsumeBool(); + info.formVisibleNotify = fdp.ConsumeBool(); + info.installedForAllUser = fdp.ConsumeBool(); + info.allowEnableNotification = fdp.ConsumeBool(); + info.allowMultiProcess = fdp.ConsumeBool(); + info.gwpAsanEnabled = fdp.ConsumeBool(); + info.hasPlugin = fdp.ConsumeBool(); + info.allowCommonEvent = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.assetAccessGroups = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.resourcesApply = fdp.ConsumeIntegral(); + info.isSystemApp = fdp.ConsumeBool(); + info.isLauncherApp = fdp.ConsumeBool(); + info.isFreeInstallApp = fdp.ConsumeBool(); + info.asanEnabled = fdp.ConsumeBool(); + info.asanLogPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.codePath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.dataDir = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.dataBaseDir = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.cacheDir = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.entryDir = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.apiReleaseType = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.debug = fdp.ConsumeBool(); + info.deviceId = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.distributedNotificationEnabled = fdp.ConsumeBool(); + info.entityType = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.process = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.supportedModes = fdp.ConsumeIntegral(); + info.vendor = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.appPrivilegeLevel = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.appDistributionType = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.appProvisionType = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.accessTokenId = fdp.ConsumeIntegral(); + info.applicationReservedFlag = fdp.ConsumeIntegral(); + info.accessTokenIdEx = fdp.ConsumeIntegral(); + info.enabled = fdp.ConsumeBool(); + info.appIndex = fdp.ConsumeIntegral(); + info.uid = fdp.ConsumeIntegral(); + info.maxChildProcess = fdp.ConsumeIntegral(); + info.applicationFlags = fdp.ConsumeIntegral(); + info.applicationFlags = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.MultiAppModeData = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.nativeLibraryPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.cpuAbi = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.arkNativeFilePath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.arkNativeFileAbi = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.permissions = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.moduleSourceDirs = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.moduleInfos = static_cast(fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH)); + info.metaData = static_cast(fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH)); + info.metaData = static_cast(fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH)); + info.targetBundleList = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.appEnvironments = static_cast(fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH)); + info.hnpPackages = static_cast(fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH)); + info.fingerprint = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + GetRandomAppQuickFix(fdp, info.appquickfixInfo) + info.icon = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.flags = fdp.ConsumeIntegral(); + info.entryModuleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.isCompressNativeLibs = fdp.ConsumeBool(); + info.signatureKey = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.multiProjects = fdp.ConsumeBool(); + info.tsanEnabled = fdp.ConsumeBool(); + info.hwasanEnabled = fdp.ConsumeBool(); + info.ubsanEnabled = fdp.ConsumeBool(); + info.cloudFileSyncEnabled = fdp.ConsumeBool(); + info.needAppDetail = fdp.ConsumeBool(); + info.appDetailAbilityLibraryPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.targetBundleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.targetPriority = fdp.ConsumeIntegral(); + info.overlayState = fdp.ConsumeIntegral(); + info.split = fdp.ConsumeBool(); + info.bundleType = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.compileSdkVersion = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.compileSdkType = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.organization = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.installSource = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.configuration = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); +} + +void GetRandomResourceInfo(FuzzedDataProvider& fdp, ResourceInfo& resourceInfo) +{ + info.bundleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.moduleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.id = fdp.ConsumeIntegral(); +} + +void GetRandomAppQuickFix(FuzzedDataProvider& fdp, AppQuickFixInfo& appquickfixInfo) +{ + info.versionCode = fdp.ConsumeIntegral(); + info.bundleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.versionName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.id = fdp.ConsumeIntegral(); + GetRandomAppqfInfo(fdp, info.appqfInfo); + GetRandomAppqfInfo(fdp, info.appqfInfo); +} + +void GetRandomAppqfInfo(FuzzedDataProvider& fdp, AppqfInfo& appqfInfo) +{ + info.QuickFixType = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.versionCode = fdp.ConsumeIntegral(); + info.versionName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.cpuAbi = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.nativeLibraryPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + GetRandomHqfInfo(fdp, info.hqfInfo); +} + +void GetRandomHqfInfo(FuzzedDataProvider& fdp, HqfInfo& hqfInfo) +{ + info.QuickFixType = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.moduleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.hapSha256 = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.hqfFilePath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.cpuAbi = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.nativeLibraryPath = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); +} + +void GetRandomDialogAbilityInfo(FuzzedDataProvider& fdp, DialogAbilityInfo& info) +{ + info.visible = fdp.ConsumeBool(); + info.bundleIconId = fdp.ConsumeIntegral(); + info.bundleLabelId = fdp.ConsumeIntegral(); + info.abilityIconId = fdp.ConsumeIntegral(); + info.abilityLabelId = fdp.ConsumeIntegral(); + info.appIndex = fdp.ConsumeIntegral(); + info.bundleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.moduleName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.abilityName = fdp.ConsumeRandomLengthString(STRING_MAX_LENGTH); + info.multiAppMode = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + std::string GetURI() const; + bool ParseURI(const std::string &uri); + void Split(const std::string &str, const std::string &delim, std::vector &vec); +} + +void GetRandomDialogSessionInfo(FuzzedDataProvider& fdp, DialogSessionInfo& info) +{ + GetRandomDialogAbilityInfo(fdp, info.info); + GetRandomDialogAbilityInfo(fdp, info.info); + AAFwk::WantParams parameters; + bool ReadFromParcel(Parcel &parcel); + virtual bool Marshalling(Parcel &parcel) const override; + static DialogSessionInfo *Unmarshalling(Parcel &parcel); +} + +void GetRandomDialogCallerInfo(FuzzedDataProvider& fdp, DialogCallerInfo& info) +{ + info.userId = fdp.ConsumeIntegral(); + info.requestCode = fdp.ConsumeIntegral(); + sptr callerToken; + Want targetWant; + info.type = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + info.needGrantUriPermission = fdp.ConsumeBool(); +} + } // namespace AbilityFuzzUtil } // namespace AppExecFwk } // namespace OHOS diff --git a/test/fuzztest/dialogsessionmanagerfifth_fuzzer/BUILD.gn b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/BUILD.gn new file mode 100644 index 00000000000..b909c3bf0d9 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/BUILD.gn @@ -0,0 +1,101 @@ +# Copyright (c) 2024-2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +import("//foundation/ability/ability_runtime/ability_runtime.gni") +module_output_path = "ability_runtime/abilitymgr" + +##############################fuzztest########################################## +ohos_fuzztest("DialogSessionManagerFifthFuzzTest") { + module_out_path = module_output_path + + fuzz_config_file = + "${ability_runtime_test_path}/fuzztest/dialogsessionmanagerfifth_fuzzer" + include_dirs = [ + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_services_path}/abilitymgr/include/utils", + "${ability_runtime_services_path}/abilitymgr/include", + ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + ] + sources = [ + "${ability_runtime_path}/services/abilitymgr/src/dialog_session/dialog_session_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/utils/start_ability_utils.cpp", + "dialogsessionmanagerfifth_fuzzer.cpp", + ] + + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] + cflags = [] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + deps = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_native_path}/ability/native:abilitykit_native", + "${ability_runtime_native_path}/appkit:appkit_manager_helper", + "${ability_runtime_path}/utils/server/startup:startup_util", + "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:perm_verification", + ] + + external_deps = [ + "ability_base:want", + "ability_base:zuri", + "bundle_framework:appexecfwk_base", + "bundle_framework:appexecfwk_core", + "c_utils:utils", + "common_event_service:cesfwk_innerkits", + "ffrt:libffrt", + "hilog:libhilog", + "hitrace:hitrace_meter", + "ipc:ipc_core", + "libjpeg-turbo:turbojpeg", + "napi:ace_napi", + "safwk:system_ability_fwk", + "samgr:samgr_proxy", + "window_manager:libmodal_system_ui_extension_client", + "window_manager:libwsutils", + ] + + if (background_task_mgr_continuous_task_enable) { + external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] + } + + if (ability_runtime_graphics) { + external_deps += [ "window_manager:libwm" ] + } +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":DialogSessionManagerFifthFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/dialogsessionmanagerfifth_fuzzer/corpus/init b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/corpus/init new file mode 100644 index 00000000000..6198079a28e --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfifth_fuzzer/dialogsessionmanagerfifth_fuzzer.cpp b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/dialogsessionmanagerfifth_fuzzer.cpp new file mode 100644 index 00000000000..37189ae8523 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/dialogsessionmanagerfifth_fuzzer.cpp @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "dialogsessionmanagerfirst_fuzzer.h" +#include +#include +#include +#define private public +#include "dialog_session_manager.h" +#undef private +#include "ability_record.h" +#include "dialog_session_manager.h" +#include "../ability_fuzz_util.h" + +using namespace OHOS::AAFwk; +using namespace OHOS::AppExecFwk; + +namespace OHOS { +namespace {} // namespace + +bool DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size) +{ + DialogSessionInfo info; + DialogCallerInfo callerInfo; + std::string dialogSessionId; + FuzzedDataProvider fdp(data, size); + dialogSessionId = fdp.ConsumeRandomLengthString(); + AbilityFuzzUtil::GetRandomDialogSessionInfo(fdp, info); + AbilityFuzzUtil::GetRandomDialogCallerInfo(fdp, callerInfo); + std::shared_ptr dialogSessionManager = std::make_shared(); + if (dialogSessionManager == nullptr) { + return false; + } + dialogSessionManager->SetDialogSessionInfo(dialogSessionId, info, callerInfo); + return true; +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + + OHOS::DoSomethingInterestingWithMyAPI(ch, size); + return 0; +} \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfifth_fuzzer/dialogsessionmanagerfifth_fuzzer.h b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/dialogsessionmanagerfifth_fuzzer.h new file mode 100644 index 00000000000..28ba0484885 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/dialogsessionmanagerfifth_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_FIFTH_FUZZER_H +#define FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_FIFTH_FUZZER_H + +#define FUZZ_PROJECT_NAME "dialogsessionmanagerfifth_fuzzer" + +#endif \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfifth_fuzzer/project.xml b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/project.xml new file mode 100644 index 00000000000..6d3e765c7dc --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfifth_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfirst_fuzzer/BUILD.gn b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/BUILD.gn new file mode 100644 index 00000000000..9b55196c97f --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/BUILD.gn @@ -0,0 +1,101 @@ +# Copyright (c) 2024-2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +import("//foundation/ability/ability_runtime/ability_runtime.gni") +module_output_path = "ability_runtime/abilitymgr" + +##############################fuzztest########################################## +ohos_fuzztest("DialogSessionManagerFirstFuzzTest") { + module_out_path = module_output_path + + fuzz_config_file = + "${ability_runtime_test_path}/fuzztest/dialogsessionmanagerfirst_fuzzer" + include_dirs = [ + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_services_path}/abilitymgr/include/utils", + "${ability_runtime_services_path}/abilitymgr/include", + ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + ] + sources = [ + "${ability_runtime_path}/services/abilitymgr/src/dialog_session/dialog_session_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/utils/start_ability_utils.cpp", + "dialogsessionmanagerfirst_fuzzer.cpp", + ] + + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] + cflags = [] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + deps = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_native_path}/ability/native:abilitykit_native", + "${ability_runtime_native_path}/appkit:appkit_manager_helper", + "${ability_runtime_path}/utils/server/startup:startup_util", + "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:perm_verification", + ] + + external_deps = [ + "ability_base:want", + "ability_base:zuri", + "bundle_framework:appexecfwk_base", + "bundle_framework:appexecfwk_core", + "c_utils:utils", + "common_event_service:cesfwk_innerkits", + "ffrt:libffrt", + "hilog:libhilog", + "hitrace:hitrace_meter", + "ipc:ipc_core", + "libjpeg-turbo:turbojpeg", + "napi:ace_napi", + "safwk:system_ability_fwk", + "samgr:samgr_proxy", + "window_manager:libmodal_system_ui_extension_client", + "window_manager:libwsutils", + ] + + if (background_task_mgr_continuous_task_enable) { + external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] + } + + if (ability_runtime_graphics) { + external_deps += [ "window_manager:libwm" ] + } +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":DialogSessionManagerFirstFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/dialogsessionmanagerfirst_fuzzer/corpus/init b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/corpus/init new file mode 100644 index 00000000000..6198079a28e --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfirst_fuzzer/dialogsessionmanagerfirst_fuzzer.cpp b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/dialogsessionmanagerfirst_fuzzer.cpp new file mode 100644 index 00000000000..e59ffd8b3fd --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/dialogsessionmanagerfirst_fuzzer.cpp @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "dialogsessionmanagerfirst_fuzzer.h" +#include +#include +#include +#define private public +#include "dialog_session_manager.h" +#undef private +#include "ability_record.h" +#include "dialog_session_manager.h" +#include "../ability_fuzz_util.h" + +using namespace OHOS::AAFwk; +using namespace OHOS::AppExecFwk; + +namespace OHOS { +namespace {} // namespace + +sptr GetFuzzAbilityToken() +{ + sptr token = nullptr; + AbilityRequest abilityRequest; + abilityRequest.appInfo.bundleName = "com.example.fuzzTest"; + abilityRequest.abilityInfo.name = "MainAbility"; + abilityRequest.abilityInfo.type = AbilityType::DATA; + std::shared_ptr abilityRecord = AbilityRecord::CreateAbilityRecord(abilityRequest); + if (abilityRecord) { + token = abilityRecord->GetToken(); + } + return token; +} + +bool DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size) +{ + AbilityRequest info; + SelectorType type; + sptr callerToken = GetFuzzAbilityToken(); + std::string dialogSessionId; + FuzzedDataProvider fdp(data, size); + bool isSCBCall = fdp.ConsumeBool(); + int32_t userId = fdp.ConsumeIntegral(); + dialogSessionId = fdp.ConsumeRandomLengthString(); + bool needGrantUriPermission = fdp.ConsumeBool(); + type = static_cast(fdp.ConsumeIntegralInRange(0, CODE_TWO)); + AbilityFuzzUtil::GetRandomAbilityRequestInfo(fdp, info); + std::shared_ptr dialogSessionManager = std::make_shared(); + if (dialogSessionManager == nullptr) { + return false; + } + dialogSessionManager->SetQueryERMSInfo(dialogSessionId, info); + dialogSessionManager->UpdateExtensionWantWithDialogCallerInfo(info, callerToken, isSCBCall); + dialogSessionManager->OnlySetDialogCallerInfo(info, userId, type, dialogSessionId, needGrantUriPermission); + return true; +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + + OHOS::DoSomethingInterestingWithMyAPI(ch, size); + return 0; +} \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfirst_fuzzer/dialogsessionmanagerfirst_fuzzer.h b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/dialogsessionmanagerfirst_fuzzer.h new file mode 100644 index 00000000000..df24110260a --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/dialogsessionmanagerfirst_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_FIRST_FUZZER_H +#define FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_FIRST_FUZZER_H + +#define FUZZ_PROJECT_NAME "dialogsessionmanagerfirst_fuzzer" + +#endif \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfirst_fuzzer/project.xml b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/project.xml new file mode 100644 index 00000000000..6d3e765c7dc --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfirst_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfourth_fuzzer/BUILD.gn b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/BUILD.gn new file mode 100644 index 00000000000..f1e434b9167 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/BUILD.gn @@ -0,0 +1,101 @@ +# Copyright (c) 2024-2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +import("//foundation/ability/ability_runtime/ability_runtime.gni") +module_output_path = "ability_runtime/abilitymgr" + +##############################fuzztest########################################## +ohos_fuzztest("DialogSessionManagerFourthFuzzTest") { + module_out_path = module_output_path + + fuzz_config_file = + "${ability_runtime_test_path}/fuzztest/dialogsessionmanagerfourth_fuzzer" + include_dirs = [ + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_services_path}/abilitymgr/include/utils", + "${ability_runtime_services_path}/abilitymgr/include", + ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + ] + sources = [ + "${ability_runtime_path}/services/abilitymgr/src/dialog_session/dialog_session_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/utils/start_ability_utils.cpp", + "dialogsessionmanagerfourth_fuzzer.cpp", + ] + + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] + cflags = [] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + deps = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_native_path}/ability/native:abilitykit_native", + "${ability_runtime_native_path}/appkit:appkit_manager_helper", + "${ability_runtime_path}/utils/server/startup:startup_util", + "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:perm_verification", + ] + + external_deps = [ + "ability_base:want", + "ability_base:zuri", + "bundle_framework:appexecfwk_base", + "bundle_framework:appexecfwk_core", + "c_utils:utils", + "common_event_service:cesfwk_innerkits", + "ffrt:libffrt", + "hilog:libhilog", + "hitrace:hitrace_meter", + "ipc:ipc_core", + "libjpeg-turbo:turbojpeg", + "napi:ace_napi", + "safwk:system_ability_fwk", + "samgr:samgr_proxy", + "window_manager:libmodal_system_ui_extension_client", + "window_manager:libwsutils", + ] + + if (background_task_mgr_continuous_task_enable) { + external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] + } + + if (ability_runtime_graphics) { + external_deps += [ "window_manager:libwm" ] + } +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":DialogSessionManagerFourthFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/dialogsessionmanagerfourth_fuzzer/corpus/init b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/corpus/init new file mode 100644 index 00000000000..6198079a28e --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfourth_fuzzer/dialogsessionmanagerfourth_fuzzer.cpp b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/dialogsessionmanagerfourth_fuzzer.cpp new file mode 100644 index 00000000000..fd7c7fe7db2 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/dialogsessionmanagerfourth_fuzzer.cpp @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "dialogsessionmanagerthird_fuzzer.h" +#include +#include +#include +#define private public +#include "dialog_session_manager.h" +#undef private + +using namespace OHOS::AAFwk; +using namespace OHOS::AppExecFwk; + +namespace OHOS { +namespace {} // namespace + +bool DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size) +{ + std::string dialogSessionId; + FuzzedDataProvider fdp(data, size); + dialogSessionId = fdp.ConsumeRandomLengthString(); + bool isAllowed = fdp.ConsumeBool(); + Want want; + std::shared_ptr dialogSessionManager = std::make_shared(); + if (dialogSessionManager == nullptr) { + return false; + } + dialogSessionManager->NotifyAbilityRequestFailure(dialogSessionId, want); + dialogSessionManager->SendDialogResult(want, dialogSessionId, isAllowed); + return true; +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + + OHOS::DoSomethingInterestingWithMyAPI(ch, size); + return 0; +} \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfourth_fuzzer/dialogsessionmanagerfourth_fuzzer.h b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/dialogsessionmanagerfourth_fuzzer.h new file mode 100644 index 00000000000..98ae49645ad --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/dialogsessionmanagerfourth_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_FOURTH_FUZZER_H +#define FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_FOURTH_FUZZER_H + +#define FUZZ_PROJECT_NAME "dialogsessionmanagerfourth_fuzzer" + +#endif \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerfourth_fuzzer/project.xml b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/project.xml new file mode 100644 index 00000000000..6d3e765c7dc --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerfourth_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagersecond_fuzzer/BUILD.gn b/test/fuzztest/dialogsessionmanagersecond_fuzzer/BUILD.gn new file mode 100644 index 00000000000..d41566cb3d9 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagersecond_fuzzer/BUILD.gn @@ -0,0 +1,101 @@ +# Copyright (c) 2024-2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +import("//foundation/ability/ability_runtime/ability_runtime.gni") +module_output_path = "ability_runtime/abilitymgr" + +##############################fuzztest########################################## +ohos_fuzztest("DialogSessionManagerSecondFuzzTest") { + module_out_path = module_output_path + + fuzz_config_file = + "${ability_runtime_test_path}/fuzztest/dialogsessionmanagersecond_fuzzer" + include_dirs = [ + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_services_path}/abilitymgr/include/utils", + "${ability_runtime_services_path}/abilitymgr/include", + ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + ] + sources = [ + "${ability_runtime_path}/services/abilitymgr/src/dialog_session/dialog_session_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/utils/start_ability_utils.cpp", + "dialogsessionmanagersecond_fuzzer.cpp", + ] + + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] + cflags = [] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + deps = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_native_path}/ability/native:abilitykit_native", + "${ability_runtime_native_path}/appkit:appkit_manager_helper", + "${ability_runtime_path}/utils/server/startup:startup_util", + "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:perm_verification", + ] + + external_deps = [ + "ability_base:want", + "ability_base:zuri", + "bundle_framework:appexecfwk_base", + "bundle_framework:appexecfwk_core", + "c_utils:utils", + "common_event_service:cesfwk_innerkits", + "ffrt:libffrt", + "hilog:libhilog", + "hitrace:hitrace_meter", + "ipc:ipc_core", + "libjpeg-turbo:turbojpeg", + "napi:ace_napi", + "safwk:system_ability_fwk", + "samgr:samgr_proxy", + "window_manager:libmodal_system_ui_extension_client", + "window_manager:libwsutils", + ] + + if (background_task_mgr_continuous_task_enable) { + external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] + } + + if (ability_runtime_graphics) { + external_deps += [ "window_manager:libwm" ] + } +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":DialogSessionManagerSecondFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/dialogsessionmanagersecond_fuzzer/corpus/init b/test/fuzztest/dialogsessionmanagersecond_fuzzer/corpus/init new file mode 100644 index 00000000000..6198079a28e --- /dev/null +++ b/test/fuzztest/dialogsessionmanagersecond_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagersecond_fuzzer/dialogsessionmanagersecond_fuzzer.cpp b/test/fuzztest/dialogsessionmanagersecond_fuzzer/dialogsessionmanagersecond_fuzzer.cpp new file mode 100644 index 00000000000..3c0f9ac6f6a --- /dev/null +++ b/test/fuzztest/dialogsessionmanagersecond_fuzzer/dialogsessionmanagersecond_fuzzer.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "dialogsessionmanagersecond_fuzzer.h" +#include +#include +#include +#define private public +#include "dialog_session_manager.h" +#undef private + +using namespace OHOS::AAFwk; +using namespace OHOS::AppExecFwk; + +namespace OHOS { +namespace {} // namespace + +bool DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size) +{ + std::string dialogSessionId; + FuzzedDataProvider fdp(data, size); + dialogSessionId = fdp.ConsumeRandomLengthString(); + bool isAllowed = fdp.ConsumeBool(); + std::shared_ptr dialogSessionManager = std::make_shared(); + if (dialogSessionManager == nullptr) { + return false; + } + dialogSessionManager->NotifyQueryERMSFinished(dialogSessionId, isAllowed); + dialogSessionManager->GetDialogSessionInfo(dialogSessionId); + dialogSessionManager->GetDialogCallerInfo(dialogSessionId); + dialogSessionManager->GetStartupSessionInfo(dialogSessionId); + dialogSessionManager->ClearDialogContext(dialogSessionId); + dialogSessionManager->ClearAllDialogContexts(); + return true; +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + + OHOS::DoSomethingInterestingWithMyAPI(ch, size); + return 0; +} \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagersecond_fuzzer/dialogsessionmanagersecond_fuzzer.h b/test/fuzztest/dialogsessionmanagersecond_fuzzer/dialogsessionmanagersecond_fuzzer.h new file mode 100644 index 00000000000..60a7ce76e63 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagersecond_fuzzer/dialogsessionmanagersecond_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_SECOND_FUZZER_H +#define FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_SECOND_FUZZER_H + +#define FUZZ_PROJECT_NAME "dialogsessionmanagersecond_fuzzer" + +#endif \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagersecond_fuzzer/project.xml b/test/fuzztest/dialogsessionmanagersecond_fuzzer/project.xml new file mode 100644 index 00000000000..6d3e765c7dc --- /dev/null +++ b/test/fuzztest/dialogsessionmanagersecond_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerthird_fuzzer/BUILD.gn b/test/fuzztest/dialogsessionmanagerthird_fuzzer/BUILD.gn new file mode 100644 index 00000000000..0c1ab9cf9a8 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerthird_fuzzer/BUILD.gn @@ -0,0 +1,101 @@ +# Copyright (c) 2024-2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#####################hydra-fuzz################### +import("//build/config/features.gni") +import("//build/ohos.gni") +import("//build/test.gni") +import("//foundation/ability/ability_runtime/ability_runtime.gni") +module_output_path = "ability_runtime/abilitymgr" + +##############################fuzztest########################################## +ohos_fuzztest("DialogSessionManagerThirdFuzzTest") { + module_out_path = module_output_path + + fuzz_config_file = + "${ability_runtime_test_path}/fuzztest/dialogsessionmanagerthird_fuzzer" + include_dirs = [ + "${ability_runtime_innerkits_path}/ability_manager/include", + "${ability_runtime_services_path}/abilitymgr/include/utils", + "${ability_runtime_services_path}/abilitymgr/include", + ] + cflags = [ + "-g", + "-O0", + "-Wno-unused-variable", + "-fno-omit-frame-pointer", + ] + sources = [ + "${ability_runtime_path}/services/abilitymgr/src/dialog_session/dialog_session_manager.cpp", + "${ability_runtime_services_path}/abilitymgr/src/utils/start_ability_utils.cpp", + "dialogsessionmanagerthird_fuzzer.cpp", + ] + + configs = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", + "${ability_runtime_services_path}/abilitymgr:abilityms_config", + ] + cflags = [] + if (target_cpu == "arm") { + cflags += [ "-DBINDER_IPC_32BIT" ] + } + deps = [ + "${ability_runtime_innerkits_path}/ability_manager:ability_manager", + "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", + "${ability_runtime_innerkits_path}/app_manager:app_manager", + "${ability_runtime_native_path}/ability/native:abilitykit_native", + "${ability_runtime_native_path}/appkit:appkit_manager_helper", + "${ability_runtime_path}/utils/server/startup:startup_util", + "${ability_runtime_services_path}/abilitymgr:abilityms", + "${ability_runtime_services_path}/common:app_util", + "${ability_runtime_services_path}/common:perm_verification", + ] + + external_deps = [ + "ability_base:want", + "ability_base:zuri", + "bundle_framework:appexecfwk_base", + "bundle_framework:appexecfwk_core", + "c_utils:utils", + "common_event_service:cesfwk_innerkits", + "ffrt:libffrt", + "hilog:libhilog", + "hitrace:hitrace_meter", + "ipc:ipc_core", + "libjpeg-turbo:turbojpeg", + "napi:ace_napi", + "safwk:system_ability_fwk", + "samgr:samgr_proxy", + "window_manager:libmodal_system_ui_extension_client", + "window_manager:libwsutils", + ] + + if (background_task_mgr_continuous_task_enable) { + external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] + } + + if (ability_runtime_graphics) { + external_deps += [ "window_manager:libwm" ] + } +} + +############################################################################### +group("fuzztest") { + testonly = true + deps = [] + deps += [ + # deps file + ":DialogSessionManagerThirdFuzzTest", + ] +} +############################################################################### diff --git a/test/fuzztest/dialogsessionmanagerthird_fuzzer/corpus/init b/test/fuzztest/dialogsessionmanagerthird_fuzzer/corpus/init new file mode 100644 index 00000000000..6198079a28e --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerthird_fuzzer/corpus/init @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerthird_fuzzer/dialogsessionmanagerthird_fuzzer.cpp b/test/fuzztest/dialogsessionmanagerthird_fuzzer/dialogsessionmanagerthird_fuzzer.cpp new file mode 100644 index 00000000000..a7babcc4350 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerthird_fuzzer/dialogsessionmanagerthird_fuzzer.cpp @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "dialogsessionmanagerthird_fuzzer.h" +#include +#include +#include +#define private public +#include "dialog_session_manager.h" +#undef private +#include "ability_record.h" +#include "../ability_fuzz_util.h" + +using namespace OHOS::AAFwk; +using namespace OHOS::AppExecFwk; + +namespace OHOS { +namespace {} // namespace + +bool DoSomethingInterestingWithMyAPI(const uint8_t *data, size_t size) +{ + AbilityRequest info; + DialogAbilityInfo infos; + AbilityFuzzUtil::GetRandomAbilityRequestInfo(fdp, info); + AbilityFuzzUtil::GetRandomDialogAbilityInfo(fdp, infos); + std::shared_ptr dialogSessionManager = std::make_shared(); + if (dialogSessionManager == nullptr) { + return false; + } + dialogSessionManager->GenerateJumpTargetAbilityInfos(info, infos); + return true; +} +} // namespace OHOS + +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + + OHOS::DoSomethingInterestingWithMyAPI(ch, size); + return 0; +} \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerthird_fuzzer/dialogsessionmanagerthird_fuzzer.h b/test/fuzztest/dialogsessionmanagerthird_fuzzer/dialogsessionmanagerthird_fuzzer.h new file mode 100644 index 00000000000..a8328771d16 --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerthird_fuzzer/dialogsessionmanagerthird_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_THIRD_FUZZER_H +#define FUZZTEST_OHOS_ABILITY_RUNTIME_DIALOG_SESSION_MANAGER_THIRD_FUZZER_H + +#define FUZZ_PROJECT_NAME "dialogsessionmanagerthird_fuzzer" + +#endif \ No newline at end of file diff --git a/test/fuzztest/dialogsessionmanagerthird_fuzzer/project.xml b/test/fuzztest/dialogsessionmanagerthird_fuzzer/project.xml new file mode 100644 index 00000000000..6d3e765c7dc --- /dev/null +++ b/test/fuzztest/dialogsessionmanagerthird_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + \ No newline at end of file -- Gitee