diff --git a/frameworks/verifier/src/verify_task.cpp b/frameworks/verifier/src/verify_task.cpp index 9adf7f1..0431a41 100644 --- a/frameworks/verifier/src/verify_task.cpp +++ b/frameworks/verifier/src/verify_task.cpp @@ -143,7 +143,13 @@ bool VerifyTask::HandleFailureClientError(std::string verifyTime, int verifyCnt) APP_DOMAIN_VERIFY_HILOGD(APP_DOMAIN_VERIFY_MODULE_EXTENSION, "called"); if (!verifyTime.empty()) { int64_t currTs = GetSecondsSince1970ToNow(); - int64_t lastTs = static_cast(std::stoll(verifyTime)); + int64_t lastTs{}; + try { + lastTs = static_cast(std::stoll(verifyTime)); + } catch (...) { + APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_MODULE_EXTENSION, "get verifyTime error"); + return false; + } int64_t duration = currTs - lastTs; int64_t currRetryDuration = CalcRetryDuration(verifyCnt); if (duration <= currRetryDuration) {