The following issues were found
drivers/media/i2c/adv7170.c
1 issues
Line: 40
Column: 11
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 adv7170 {
struct v4l2_subdev sd;
unsigned char reg[128];
v4l2_std_id norm;
int input;
};
Reported by FlawFinder.
drivers/md/dm-zoned-target.c
1 issues
Line: 1087
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 dmz_target *dmz = ti->private;
ssize_t sz = 0;
char buf[BDEVNAME_SIZE];
struct dmz_dev *dev;
int i;
switch (type) {
case STATUSTYPE_INFO:
Reported by FlawFinder.
drivers/net/can/cc770/cc770.h
1 issues
Line: 183
Column: 11
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
void __iomem *reg_base; /* ioremap'ed address to registers */
unsigned long irq_flags; /* for request_irq() */
unsigned char obj_flags[CC770_OBJ_MAX];
u8 control_normal_mode; /* Control register for normal mode */
u8 cpu_interface; /* CPU interface register */
u8 clkout; /* Clock out register */
u8 bus_config; /* Bus configuration register */
Reported by FlawFinder.
drivers/net/ethernet/chelsio/libcxgb/libcxgb_ppm.c
1 issues
Line: 471
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
spin_lock_init(&ppm->map_lock);
kref_init(&ppm->refcnt);
memcpy(&ppm->tformat, tformat, sizeof(struct cxgbi_tag_format));
ppm->ppm_pp = ppm_pp;
ppm->ndev = ndev;
ppm->pdev = pdev;
ppm->lldev = lldev;
Reported by FlawFinder.
drivers/media/dvb-frontends/zl10036.c
1 issues
Line: 488
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
fe->tuner_priv = state;
memcpy(&fe->ops.tuner_ops, &zl10036_tuner_ops,
sizeof(struct dvb_tuner_ops));
printk(KERN_INFO "%s: tuner initialization (%s addr=0x%02x) ok\n",
__func__, fe->ops.tuner_ops.info.name, config->tuner_address);
return fe;
Reported by FlawFinder.
drivers/net/can/led.c
1 issues
Line: 105
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 net_device *netdev = netdev_notifier_info_to_dev(ptr);
struct can_priv *priv = safe_candev_priv(netdev);
char name[CAN_LED_NAME_SZ];
if (!priv)
return NOTIFY_DONE;
if (!priv->tx_led_trig || !priv->rx_led_trig || !priv->rxtx_led_trig)
Reported by FlawFinder.
drivers/media/dvb-frontends/ves1x93.c
1 issues
Line: 493
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
/* create dvb_frontend */
memcpy(&state->frontend.ops, &ves1x93_ops, sizeof(struct dvb_frontend_ops));
state->frontend.demodulator_priv = state;
return &state->frontend;
error:
kfree(state);
Reported by FlawFinder.
drivers/net/can/sja1000/peak_pci.c
1 issues
Line: 456
Column: 3
CWE codes:
120
card->led_chip.owner = THIS_MODULE;
card->led_chip.dev.parent = &pdev->dev;
card->led_chip.algo_data = &card->i2c_bit;
strncpy(card->led_chip.name, "peak_i2c",
sizeof(card->led_chip.name));
card->i2c_bit = peak_pciec_i2c_bit_ops;
card->i2c_bit.udelay = 10;
card->i2c_bit.timeout = HZ;
Reported by FlawFinder.
drivers/net/can/sja1000/peak_pcmcia.c
1 issues
Line: 473
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
for (i = 0; i < card->chan_count; i++) {
struct net_device *netdev;
char name[IFNAMSIZ];
led_mask |= PCC_LED(i);
netdev = card->channel[i].netdev;
if (!netdev)
Reported by FlawFinder.
drivers/media/dvb-frontends/ves1820.c
1 issues
Line: 387
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
printk("ves1820: pwm=0x%02x\n", state->pwm);
/* create dvb_frontend */
memcpy(&state->frontend.ops, &ves1820_ops, sizeof(struct dvb_frontend_ops));
state->frontend.ops.info.symbol_rate_min = (state->config->xin / 2) / 64; /* SACLK/64 == (XIN/2)/64 */
state->frontend.ops.info.symbol_rate_max = (state->config->xin / 2) / 4; /* SACLK/4 */
state->frontend.demodulator_priv = state;
return &state->frontend;
Reported by FlawFinder.