The following issues were found
drivers/net/wireless/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac_tx.h
1 issues
Line: 35
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
),
TP_fast_assign(
__assign_str(dev, dev_name(dev));
memcpy(__get_dynamic_array(txh), txh, txh_len);
),
TP_printk("[%s] txdesc", __get_str(dev))
);
TRACE_EVENT(brcms_txstatus,
Reported by FlawFinder.
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c
1 issues
Line: 632
CWE codes:
758
/* Check that all mask fields were consumed */
for (i = 0; i < sizeof(struct mlx5dr_match_param); i++) {
if (((u8 *)&mask)[i] != 0) {
mlx5dr_dbg(dmn, "Mask contains unsupported parameters\n");
return -EOPNOTSUPP;
}
}
Reported by Cppcheck.
drivers/net/ethernet/mellanox/mlx5/core/lib/hv_vhca.c
1 issues
Line: 326
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
data_block->sequence = agent->seq;
data_block->offset = (*offset)++;
memcpy(data_block->data, src, bytes);
return bytes;
}
static void mlx5_hv_vhca_agent_seq_update(struct mlx5_hv_vhca_agent *agent)
Reported by FlawFinder.
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-dcb.c
1 issues
Line: 14
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!(priv->link_state.options & DPNI_LINK_OPT_PFC_PAUSE))
return 0;
memcpy(pfc, &priv->pfc, sizeof(priv->pfc));
pfc->pfc_cap = dpaa2_eth_tc_count(priv);
return 0;
}
Reported by FlawFinder.
drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h
1 issues
Line: 23
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
struct gpio_desc;
struct brcms_led {
char name[32];
struct gpio_desc *gpiod;
};
#ifdef CONFIG_BCMA_DRIVER_GPIO
void brcms_led_unregister(struct brcms_info *wl);
Reported by FlawFinder.
drivers/net/ethernet/mellanox/mlx5/core/lib/gid.c
1 issues
Line: 140
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
ether_addr_copy(addr_mac, mac);
memcpy(addr_l3_addr, gid, gidsz);
}
MLX5_SET_RA(in_addr, roce_version, roce_version);
MLX5_SET_RA(in_addr, roce_l3_type, roce_l3_type);
if (MLX5_CAP_GEN(dev, num_vhca_ports) > 0)
Reported by FlawFinder.
drivers/net/macvtap.c
1 issues
Line: 152
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
struct device *classdev;
dev_t devt;
int err;
char tap_name[IFNAMSIZ];
if (dev->rtnl_link_ops != &macvtap_link_ops)
return NOTIFY_DONE;
snprintf(tap_name, IFNAMSIZ, "tap%d", dev->ifindex);
Reported by FlawFinder.
drivers/net/mdio/mdio-gpio.c
1 issues
Line: 128
Column: 3
CWE codes:
120
if (bus_id != -1)
snprintf(new_bus->id, MII_BUS_ID_SIZE, "gpio-%x", bus_id);
else
strncpy(new_bus->id, "gpio", MII_BUS_ID_SIZE);
if (pdata) {
new_bus->phy_mask = pdata->phy_mask;
new_bus->phy_ignore_ta_mask = pdata->phy_ignore_ta_mask;
}
Reported by FlawFinder.
drivers/net/ethernet/intel/ixgbevf/vf.h
1 issues
Line: 76
Column: 8
CWE codes:
120
20
struct ixgbe_mbx_operations {
s32 (*init_params)(struct ixgbe_hw *hw);
s32 (*read)(struct ixgbe_hw *, u32 *, u16);
s32 (*write)(struct ixgbe_hw *, u32 *, u16);
s32 (*read_posted)(struct ixgbe_hw *, u32 *, u16);
s32 (*write_posted)(struct ixgbe_hw *, u32 *, u16);
s32 (*check_for_msg)(struct ixgbe_hw *);
s32 (*check_for_ack)(struct ixgbe_hw *);
Reported by FlawFinder.