The following issues were found
drivers/media/usb/pvrusb2/pvrusb2-sysfs.c
1 issues
Line: 66
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 attribute *attr_gen[8];
struct attribute_group grp;
int created_ok;
char name[80];
};
struct pvr2_sysfs_class {
struct class class;
};
Reported by FlawFinder.
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
1 issues
Line: 1057
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
iring1.s.isize = OCTEON_MGMT_RX_RING_SIZE;
cvmx_write_csr(p->mix + MIX_IRING1, iring1.u64);
memcpy(sa.sa_data, netdev->dev_addr, ETH_ALEN);
octeon_mgmt_set_mac_address(netdev, &sa);
octeon_mgmt_change_mtu(netdev, netdev->mtu);
/* Enable the port HW. Packets are not allowed until
Reported by FlawFinder.
drivers/media/platform/sti/c8sectpfe/c8sectpfe-dvb.c
1 issues
Line: 164
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return -ENOMEM;
}
memcpy(tda18212, &tda18212_conf,
sizeof(struct tda18212_config));
tda18212->fe = (*fe);
tda18212_info.platform_data = tda18212;
Reported by FlawFinder.
drivers/media/usb/pwc/pwc-kiara.h
1 issues
Line: 27
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
char alternate; /* USB alternate interface */
unsigned short packetsize; /* Normal packet size */
unsigned short bandlength; /* Bandlength when decompressing */
unsigned char mode[12]; /* precomputed mode settings for cam */
};
extern const struct Kiara_table_entry Kiara_table[PSZ_MAX][PWC_FPS_MAX_KIARA][4];
extern const unsigned int KiaraRomTable[8][2][16][8];
extern const unsigned int Kiara_fps_vector[PWC_FPS_MAX_KIARA];
Reported by FlawFinder.
drivers/media/usb/pwc/pwc-timon.h
1 issues
Line: 42
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
char alternate; /* USB alternate interface */
unsigned short packetsize; /* Normal packet size */
unsigned short bandlength; /* Bandlength when decompressing */
unsigned char mode[13]; /* precomputed mode settings for cam */
};
extern const struct Timon_table_entry Timon_table[PSZ_MAX][PWC_FPS_MAX_TIMON][4];
extern const unsigned int TimonRomTable [16][2][16][8];
extern const unsigned int Timon_fps_vector[PWC_FPS_MAX_TIMON];
Reported by FlawFinder.
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c
1 issues
Line: 77
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
release_firmware(fw_blob);
return -ENOMEM;
}
memcpy(dev->fw_buf.virt, fw_blob->data, fw_blob->size);
wmb();
dev->fw_get_done = true;
release_firmware(fw_blob);
mfc_debug_leave();
return 0;
Reported by FlawFinder.
drivers/net/ethernet/cavium/thunder/nic.h
1 issues
Line: 373
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
/* MSI-X */
u8 num_vec;
char irq_name[NIC_VF_MSIX_VECTORS][IFNAMSIZ + 15];
bool irq_allocated[NIC_VF_MSIX_VECTORS];
cpumask_var_t affinity_mask[NIC_VF_MSIX_VECTORS];
/* VF <-> PF mailbox communication */
bool pf_acked;
Reported by FlawFinder.
drivers/media/usb/stkwebcam/stk-webcam.c
1 issues
Line: 405
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
continue;
}
spin_unlock_irqrestore(&dev->spinlock, flags);
memcpy(fill, iso_buf, framelen);
spin_lock_irqsave(&dev->spinlock, flags);
fill += framelen;
/* New size of our buffer */
fb->v4lbuf.bytesused += framelen;
Reported by FlawFinder.
drivers/media/usb/stkwebcam/stk-webcam.h
1 issues
drivers/media/usb/tm6000/tm6000-cards.c
1 issues
Line: 56
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 tm6000_board {
char *name;
char eename[16]; /* EEPROM name */
unsigned eename_size; /* size of EEPROM name */
unsigned eename_pos; /* Position where it appears at ROM */
struct tm6000_capabilities caps;
Reported by FlawFinder.