diff --git a/services/implementation/src/authentication_v2/auth_stages/auth_pin_auth.cpp b/services/implementation/src/authentication_v2/auth_stages/auth_pin_auth.cpp index 815401fec0984013512150d2fa030216dc913212..e04cd9ebacbbfdfbc300fd534fd491d08780e481 100644 --- a/services/implementation/src/authentication_v2/auth_stages/auth_pin_auth.cpp +++ b/services/implementation/src/authentication_v2/auth_stages/auth_pin_auth.cpp @@ -513,6 +513,7 @@ int32_t AuthSrcPinInputState::ShowStartAuthDialog(std::shared_ptr int32_t AuthSrcPinInputState::Action(std::shared_ptr context) { LOGI("AuthSrcPinInputState::Action start"); + CHECK_NULL_RETURN(context, STOP_BIND); if (context->inputPinAuthFailTimes == 0) { auto ret = ShowStartAuthDialog(context); if (ret != DM_OK) { @@ -520,9 +521,11 @@ int32_t AuthSrcPinInputState::Action(std::shared_ptr context) } } else { // clear input pin box, and show try again + CHECK_NULL_RETURN(context->authUiStateMgr, STOP_BIND); context->authUiStateMgr->UpdateUiState(DmUiStateMsg::MSG_PIN_CODE_ERROR); } + CHECK_NULL_RETURN(context->authStateMachine, STOP_BIND); LOGI("AuthSrcPinInputState::Action waitting user operation"); // wait for user operation if (DmEventType::ON_USER_OPERATION != diff --git a/test/commonfuzztest/authpinauth_fuzzer/auth_pin_auth_fuzzer.cpp b/test/commonfuzztest/authpinauth_fuzzer/auth_pin_auth_fuzzer.cpp index 9c40d6255357cc018660bbd6b4c82b22213f4a5b..d8bc891014231e6d1455fcc7108bc23517e0380f 100644 --- a/test/commonfuzztest/authpinauth_fuzzer/auth_pin_auth_fuzzer.cpp +++ b/test/commonfuzztest/authpinauth_fuzzer/auth_pin_auth_fuzzer.cpp @@ -55,7 +55,6 @@ void AuthPinAuthFuzzTest(const uint8_t* data, size_t size) context->accesser.isGenerateLnnCredential = false; context->listener = std::make_shared(); auth4->ShowStartAuthDialog(context); - auth4->Action(context); auth5->GetStateType(); auth6->GetStateType(); auth7->GetStateType(); diff --git a/test/unittest/UTTest_device_manager_service_two.cpp b/test/unittest/UTTest_device_manager_service_two.cpp index cdf401b7c3f80046d2536eb7a67b03c4f07a9451..7c658a6ab6956673a24a6b5d73e4f0c3a28f2962 100644 --- a/test/unittest/UTTest_device_manager_service_two.cpp +++ b/test/unittest/UTTest_device_manager_service_two.cpp @@ -1605,6 +1605,7 @@ HWTEST_F(DeviceManagerServiceTest, UpdateLocalServiceInfo_201, testing::ext::Tes DeviceManagerService::GetInstance().NotifyRemoteLocalUserSwitchByWifi(localUdid, wifiDevices, foregroundUserIds, backgroundUserIds); GTEST_LOG_(INFO) << "NotifyRemoteLocalUserSwitchByWifi end" ; + sleep(3); DeviceManagerService::GetInstance().softbusListener_ = nullptr; }