!1501 【告警清理】

Merge pull request !1501 from bchen90/master
This commit is contained in:
openharmony_ci 2024-08-28 13:27:58 +00:00 committed by Gitee
commit af817260c5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 6 additions and 6 deletions

View File

@ -457,12 +457,8 @@ struct HdcSession {
return oss.str();
}
HdcSession()
HdcSession():serverOrDaemon(false), handshakeOK(false), isDead(false), voteReset(false)
{
serverOrDaemon = false;
handshakeOK = false;
isDead = false;
voteReset = false;
connectKey = "";
connType = CONN_USB;
sessionId = 0;
@ -483,6 +479,10 @@ struct HdcSession {
(void)memset_s(pollHandle, sizeof(pollHandle), 0, sizeof(pollHandle));
(void)memset_s(ctrlFd, sizeof(ctrlFd), 0, sizeof(ctrlFd));
(void)memset_s(dataFd, sizeof(dataFd), 0, sizeof(dataFd));
(void)memset_s(&childLoop, sizeof(childLoop), 0, sizeof(childLoop));
(void)memset_s(dataPipe, sizeof(dataPipe), 0, sizeof(dataPipe));
(void)memset_s(&hChildWorkTCP, sizeof(hChildWorkTCP), 0, sizeof(hChildWorkTCP));
(void)memset_s(&fdChildWorkTCP, sizeof(fdChildWorkTCP), 0, sizeof(fdChildWorkTCP));
#ifdef HDC_SUPPORT_UART
hUART = nullptr;
#endif

View File

@ -540,7 +540,7 @@ bool HdcDaemon::AuthVerifyRsaSign(HSession hSession, const string &tokenSign, co
break;
}
// the length of vaild sign result for BASE64 can't bigger than EVP_PKEY_size(signKey) * 2
if (tokenSign.size() > (EVP_PKEY_size(signKey) * (unsigned long)2)) {
if (tokenSign.size() > ((size_t)EVP_PKEY_size(signKey) * (size_t)2)) {
WRITE_LOG(LOG_FATAL, "invalid base64 sign size %zd for session %u", tokenSign.size(), hSession->sessionId);
break;
}