!1686 版本告警修改

Merge pull request !1686 from 武宏博/master
This commit is contained in:
openharmony_ci 2024-01-02 11:28:42 +00:00 committed by Gitee
commit 2f22a06acc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -218,7 +218,7 @@ WifiErrorCode GetApIfaceName(char *ifaceName, int nameLen)
std::string iface;
OHOS::Wifi::ErrCode ret = hotspotPtr->GetApIfaceName(iface);
if (ret == OHOS::Wifi::WIFI_OPT_SUCCESS) {
if (iface.size() > nameLen) {
if (iface.size() > static_cast<unsigned long>(nameLen)) {
return ERROR_WIFI_INVALID_ARGS;
}
if (memcpy_s(ifaceName, nameLen, iface.c_str(), iface.size()) != EOK) {