mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-30 12:20:43 +00:00
commit
0b21fe74bf
@ -110,7 +110,7 @@ static int32_t ConvertMsgToHiSysEvent(SoftBusEvtReportMsg *msg)
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
for (uint32_t i = 0; i < msg->paramNum; i++) {
|
||||
if (strcpy_s(g_dstParam[i].name, SOFTBUS_HISYSEVT_NAME_LEN, msg->paramArray[i].paramName) != EOK) {
|
||||
if (strcpy_s(g_dstParam[i].name, MAX_LENGTH_OF_PARAM_NAME, msg->paramArray[i].paramName) != EOK) {
|
||||
HILOG_ERROR(SOFTBUS_HILOG_ID, "copy param fail");
|
||||
return SOFTBUS_ERR;
|
||||
}
|
||||
|
@ -1007,11 +1007,6 @@ static int32_t RegisterCapability(DiscBleInfo *info, const DiscBleOption *option
|
||||
return SOFTBUS_MALLOC_ERR;
|
||||
}
|
||||
}
|
||||
if (custDataLen > CUST_DATA_MAX_LEN) {
|
||||
DLOGE("custDataLen(%u) larger than CUST_DATA_MAX_LEN", custDataLen);
|
||||
SoftBusFree(info->capabilityData[pos]);
|
||||
return SOFTBUS_INVALID_PARAM;
|
||||
}
|
||||
if (memcpy_s(info->capabilityData[pos], CUST_DATA_MAX_LEN, custData, custDataLen) != EOK) {
|
||||
SoftBusFree(info->capabilityData[pos]);
|
||||
return SOFTBUS_MEM_ERR;
|
||||
|
@ -172,10 +172,6 @@ NO_SANITIZE("cfi") int32_t AssembleTLV(BroadcastData *broadcastData, uint8_t dat
|
||||
/* A helper function for copying TLV value to destination */
|
||||
static int32_t CopyValue(void *dst, uint32_t dstLen, const void *src, uint32_t srcLen, const char *hint)
|
||||
{
|
||||
if (srcLen > dstLen) {
|
||||
DLOGE("srcLen(%u) > dstLen(%u)", srcLen, dstLen);
|
||||
return SOFTBUS_INVALID_PARAM;
|
||||
}
|
||||
if (memcpy_s(dst, dstLen, src, srcLen) != EOK) {
|
||||
DLOGE("parse tlv memcpy failed, tlvType: %s, tlvLen: %u, dstLen: %u", hint, srcLen, dstLen);
|
||||
return SOFTBUS_MEM_ERR;
|
||||
|
Loading…
Reference in New Issue
Block a user