通用告警修改

Signed-off-by: Wuhongbo <wuhongbo7@h-partners.com>
This commit is contained in:
Wuhongbo 2024-01-02 10:00:40 +08:00
parent 2e4e53eeb0
commit 8f6b1fd120

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) {