The following issues were found
drivers/media/dvb-frontends/tda665x.h
1 issues
Line: 12
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
#define __TDA665x_H
struct tda665x_config {
char name[128];
u8 addr;
u32 frequency_min;
u32 frequency_max;
u32 frequency_offst;
Reported by FlawFinder.
drivers/media/dvb-frontends/tda665x.c
1 issues
Line: 221
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
fe->ops.tuner_ops = tda665x_ops;
info = &fe->ops.tuner_ops.info;
memcpy(info->name, config->name, sizeof(config->name));
info->frequency_min_hz = config->frequency_min;
info->frequency_max_hz = config->frequency_max;
info->frequency_step_hz = config->frequency_offst;
printk(KERN_DEBUG "%s: Attaching TDA665x (%s) tuner\n", __func__, info->name);
Reported by FlawFinder.
drivers/media/dvb-frontends/tda10086.c
1 issues
Line: 755
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
/* create dvb_frontend */
memcpy(&state->frontend.ops, &tda10086_ops, sizeof(struct dvb_frontend_ops));
state->frontend.demodulator_priv = state;
return &state->frontend;
}
module_param(debug, int, 0644);
Reported by FlawFinder.
drivers/net/can/usb/peak_usb/pcan_usb_core.c
1 issues
Line: 909
Column: 3
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
/* unregister as many netdev devices as siblings */
for (dev = usb_get_intfdata(intf); dev; dev = dev_prev_siblings) {
struct net_device *netdev = dev->netdev;
char name[IFNAMSIZ];
dev_prev_siblings = dev->prev_siblings;
dev->state &= ~PCAN_USB_STATE_CONNECTED;
strlcpy(name, netdev->name, IFNAMSIZ);
Reported by FlawFinder.
drivers/media/dvb-frontends/tda10023.c
1 issues
Line: 527
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if ((tda10023_readreg(state, 0x1a) & 0xf0) != 0x70) goto error;
/* create dvb_frontend */
memcpy(&state->frontend.ops, &tda10023_ops, sizeof(struct dvb_frontend_ops));
state->pwm = pwm;
state->reg0 = REG0_INIT_VAL;
if (state->config->xtal) {
state->xtal = state->config->xtal;
state->pll_m = state->config->pll_m;
Reported by FlawFinder.
drivers/md/dm-verity-verify-sig.c
1 issues
Line: 58
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
sig_opts->sig_size = ukp->datalen;
memcpy(sig_opts->sig, ukp->data, sig_opts->sig_size);
end:
up_read(&key->sem);
key_put(key);
Reported by FlawFinder.
drivers/net/can/xilinx_can.c
1 issues
Line: 1098
Column: 4
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (skb) {
skb_cf->can_id |= cf.can_id;
memcpy(skb_cf->data, cf.data, CAN_ERR_DLC);
stats->rx_packets++;
stats->rx_bytes += CAN_ERR_DLC;
netif_rx(skb);
}
}
Reported by FlawFinder.
drivers/net/dsa/b53/b53_common.c
1 issues
Line: 1703
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
ent.vid = vid;
ent.is_static = true;
ent.is_age = false;
memcpy(ent.mac, addr, ETH_ALEN);
b53_arl_from_entry(&mac_vid, &fwd_entry, &ent);
b53_write64(dev, B53_ARLIO_PAGE,
B53_ARLTBL_MAC_VID_ENTRY(idx), mac_vid);
b53_write32(dev, B53_ARLIO_PAGE,
Reported by FlawFinder.
drivers/net/dsa/bcm_sf2.c
1 issues
Line: 1315
Column: 8
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
static int bcm_sf2_sw_probe(struct platform_device *pdev)
{
const char *reg_names[BCM_SF2_REGS_NUM] = BCM_SF2_REGS_NAME;
struct device_node *dn = pdev->dev.of_node;
const struct of_device_id *of_id = NULL;
const struct bcm_sf2_of_data *data;
struct b53_platform_data *pdata;
struct dsa_switch_ops *ops;
Reported by FlawFinder.
drivers/usb/gadget/udc/bdc/bdc_ep.c
1 issues
Line: 1074
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
__func__, ep0_state_string[bdc->ep0_state]);
/* Store received setup packet */
setup_pkt = &bdc->setup_pkt;
memcpy(setup_pkt, &sreport->offset[0], sizeof(*setup_pkt));
len = le16_to_cpu(setup_pkt->wLength);
if (!len)
bdc->ep0_state = WAIT_FOR_STATUS_START;
else
bdc->ep0_state = WAIT_FOR_DATA_START;
Reported by FlawFinder.