The following issues were found

drivers/scsi/aic94xx/aic94xx_hwi.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 91 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 flash_struct flash;

	u8     sas_addr[SAS_ADDR_SIZE];
	char   pcba_sn[ASD_PCBA_SN_SIZE+1];

	u8     enabled_phys;	  /* mask of enabled phys */
	struct asd_phy_desc phy_desc[ASD_MAX_PHYS];
	u32    max_scbs;	  /* absolute sequencer scb queue size */
	struct asd_dma_tok *scb_ext;

            

Reported by FlawFinder.

drivers/pci/hotplug/shpchp_core.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 68 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 slot *slot;
	struct hotplug_slot *hotplug_slot;
	char name[SLOT_NAME_SIZE];
	int retval;
	int i;

	for (i = 0; i < ctrl->num_slots; i++) {
		slot = kzalloc(sizeof(*slot), GFP_KERNEL);

            

Reported by FlawFinder.

drivers/scsi/aic94xx/aic94xx_reg.h
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 64 Column: 13 CWE codes: 120 20

              					 u32 offs)                    \
{                                                                     \
	struct asd_ha_addrspace *io_handle = &asd_ha->io_handle[1];   \
	type val = read##S (io_handle->addr + (unsigned long) offs);  \
	rmb();                                                        \
	return val;                                                   \
}

ASD_READ_OCM(u8, byte, b);

            

Reported by FlawFinder.

drivers/pci/hotplug/s390_pci_hpc.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 92 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

              
int zpci_init_slot(struct zpci_dev *zdev)
{
	char name[SLOT_NAME_SIZE];
	struct zpci_bus *zbus = zdev->zbus;

	zdev->hotplug_slot.ops = &s390_hotplug_slot_ops;

	snprintf(name, SLOT_NAME_SIZE, "%08x", zdev->fid);

            

Reported by FlawFinder.

drivers/pci/hotplug/pciehp_core.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 53 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

              static int init_slot(struct controller *ctrl)
{
	struct hotplug_slot_ops *ops;
	char name[SLOT_NAME_SIZE];
	int retval;

	/* Setup hotplug slot ops */
	ops = kzalloc(sizeof(*ops), GFP_KERNEL);
	if (!ops)

            

Reported by FlawFinder.

drivers/scsi/aic94xx/aic94xx_seq.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 309 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              		u32 left = min(size-page*MAX_DMA_OVLY_COUNT,
			       (u32)MAX_DMA_OVLY_COUNT);

		memcpy(token->vaddr, prog + page*MAX_DMA_OVLY_COUNT, left);
		asd_write_reg_addr(asd_ha, OVLYDMAADR, token->dma_handle);
		asd_write_reg_dword(asd_ha, OVLYDMACNT, left);
		reg = !page ? RESETOVLYDMA : 0;
		reg |= (STARTOVLYDMA | OVLYHALTERR);
		reg |= (lseq_mask ? (((u32)lseq_mask) << 8) : OVLYCSEQ);

            

Reported by FlawFinder.

drivers/scsi/aic94xx/aic94xx_seq.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 28 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

              	/* numeric minor version */
	u32	minor;
	/* version string printed by driver */
	char	version[16];
	u32	cseq_table_offset;
	u32	cseq_table_size;
	u32	lseq_table_offset;
	u32	lseq_table_size;
	u32	cseq_code_offset;

            

Reported by FlawFinder.

drivers/pci/hotplug/cpqphp_core.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 583 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

              	u8 slot_number;
	u8 ctrl_slot;
	u32 tempdword;
	char name[SLOT_NAME_SIZE];
	void __iomem *slot_entry = NULL;
	int result;

	dbg("%s\n", __func__);


            

Reported by FlawFinder.

drivers/pci/hotplug/cpci_hotplug_core.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 193 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

              cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
{
	struct slot *slot;
	char name[SLOT_NAME_SIZE];
	int status;
	int i;

	if (!(controller && bus))
		return -ENODEV;

            

Reported by FlawFinder.

drivers/pci/hotplug/acpiphp_core.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 263 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 slot *slot;
	int retval = -ENOMEM;
	char name[SLOT_NAME_SIZE];

	slot = kzalloc(sizeof(*slot), GFP_KERNEL);
	if (!slot)
		goto error;


            

Reported by FlawFinder.