diff --git a/interfaces/innerkits/nativetoken/src/nativetoken.c b/interfaces/innerkits/nativetoken/src/nativetoken.c index 0fe51064750426b0bd2032e20ebcc75f482bc627..92d723feadff32f40b1cbbbe6b43f270c9904373 100644 --- a/interfaces/innerkits/nativetoken/src/nativetoken.c +++ b/interfaces/innerkits/nativetoken/src/nativetoken.c @@ -347,7 +347,7 @@ static uint32_t GetRandomTokenId(uint32_t *randNum) (void)fdsan_close_with_tag(fd, g_nativeFdTag); if (len != sizeof(random)) { - LOGC("Faild to read, len(%" PRIdPTR "", len); + LOGC("Failed to read, len(%" PRIdPTR "", len); return ATRET_FAILED; } *randNum = random; diff --git a/test/fuzztest/services/accesstoken/BUILD.gn b/test/fuzztest/services/accesstoken/BUILD.gn index c396cac2793b1b0ed636ff40a4debdbd51e606a5..5c5eb261926e0206f3645707b181150345a3017a 100644 --- a/test/fuzztest/services/accesstoken/BUILD.gn +++ b/test/fuzztest/services/accesstoken/BUILD.gn @@ -52,7 +52,7 @@ group("fuzztest") { "registerselfpermstatechangecallbackstub_fuzzer:RegisterSelfPermStateChangeCallbackStubFuzzTest", "requestapppermonsettingstub_fuzzer:RequestAppPermOnSettingStubFuzzTest", "revokepermissionstub_fuzzer:RevokePermissionStubFuzzTest", - "setpermdialogcap_fuzzer:SetPermDialogCapFuzzTest", + "setpermdialogcapstub_fuzzer:SetPermDialogCapStubFuzzTest", "setpermissionrequesttogglestatusstub_fuzzer:SetPermissionRequestToggleStatusStubFuzzTest", "setpermissionstatuswithpolicystub_fuzzer:SetPermissionStatusWithPolicyStubFuzzTest", "setremotehaptokeninfostub_fuzzer:SetRemoteHapTokenInfoStubFuzzTest", diff --git a/test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/BUILD.gn b/test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/BUILD.gn similarity index 93% rename from test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/BUILD.gn rename to test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/BUILD.gn index 9d6c55db430343c2f2f55fa0b26b49357a3e286f..5f88a74ea6feb3fdf8b4911f3ce85a916c68f106 100644 --- a/test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/BUILD.gn +++ b/test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/BUILD.gn @@ -15,11 +15,11 @@ import("//build/test.gni") import("../../../../../access_token.gni") import("../access_token_service_fuzz.gni") -ohos_fuzztest("SetPermDialogCapFuzzTest") { +ohos_fuzztest("SetPermDialogCapStubFuzzTest") { module_out_path = module_output_path_service_access_token fuzz_config_file = "." - sources = [ "setpermdialogcap_fuzzer.cpp" ] + sources = [ "setpermdialogcapstub_fuzzer.cpp" ] cflags = [ "-g", diff --git a/test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/corpus/init b/test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/corpus/init similarity index 100% rename from test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/corpus/init rename to test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/corpus/init diff --git a/test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/project.xml b/test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/project.xml similarity index 100% rename from test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/project.xml rename to test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/project.xml diff --git a/test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/setpermdialogcap_fuzzer.cpp b/test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/setpermdialogcapstub_fuzzer.cpp similarity index 92% rename from test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/setpermdialogcap_fuzzer.cpp rename to test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/setpermdialogcapstub_fuzzer.cpp index 478721e78e873acced7ee142dfe5bf0183969b51..3c569f31881333f24780806dd0b0fa4e83e396eb 100644 --- a/test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/setpermdialogcap_fuzzer.cpp +++ b/test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/setpermdialogcapstub_fuzzer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "setpermdialogcap_fuzzer.h" +#include "setpermdialogcapstub_fuzzer.h" #include #include @@ -50,7 +50,7 @@ namespace OHOS { .dcaps = nullptr, .perms = perms, .acls = nullptr, - .processName = "setpermdialogcap_fuzzer", + .processName = "setpermdialogcapstub_fuzzer", .aplStr = "system_core", }; @@ -60,7 +60,7 @@ namespace OHOS { delete[] perms; } - bool SetPermDialogCapFuzzTest(const uint8_t* data, size_t size) + bool SetPermDialogCapStubFuzzTest(const uint8_t* data, size_t size) { if ((data == nullptr) || (size == 0)) { return false; @@ -97,6 +97,6 @@ extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { /* Run your code on data */ - OHOS::SetPermDialogCapFuzzTest(data, size); + OHOS::SetPermDialogCapStubFuzzTest(data, size); return 0; } diff --git a/test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/setpermdialogcap_fuzzer.h b/test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/setpermdialogcapstub_fuzzer.h similarity index 73% rename from test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/setpermdialogcap_fuzzer.h rename to test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/setpermdialogcapstub_fuzzer.h index 777680b48debb6a2090cb40037dbc0c4983a4042..3c3fff672b27ff62876bed04e2a81e363aa35cd6 100644 --- a/test/fuzztest/services/accesstoken/setpermdialogcap_fuzzer/setpermdialogcap_fuzzer.h +++ b/test/fuzztest/services/accesstoken/setpermdialogcapstub_fuzzer/setpermdialogcapstub_fuzzer.h @@ -13,9 +13,9 @@ * limitations under the License. */ -#ifndef TEST_FUZZTEST_SETPERM_DIALOG_CAP_FUZZER_H -#define TEST_FUZZTEST_SETPERM_DIALOG_CAP_FUZZER_H +#ifndef TEST_FUZZTEST_SETPERM_DIALOG_CAP_STUB_FUZZER_H +#define TEST_FUZZTEST_SETPERM_DIALOG_CAP_STUB_FUZZER_H -#define FUZZ_PROJECT_NAME "setpermdialogcap_fuzzer" +#define FUZZ_PROJECT_NAME "setpermdialogcapstub_fuzzer" -#endif // TEST_FUZZTEST_SETPERM_DIALOG_CAP_FUZZER_H +#endif // TEST_FUZZTEST_SETPERM_DIALOG_CAP_STUB_FUZZER_H