The following issues were found
drivers/acpi/acpica/tbdata.c
1 issues
Line: 598
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (acpi_gbl_root_table_list.tables) {
for (i = 0; i < table_count; i++) {
if (acpi_gbl_root_table_list.tables[i].address) {
memcpy(tables + current_table_count,
acpi_gbl_root_table_list.tables + i,
sizeof(struct acpi_table_desc));
current_table_count++;
}
}
Reported by FlawFinder.
drivers/acpi/acpica/rslist.c
1 issues
Line: 13
#include "acresrc.h"
#define _COMPONENT ACPI_RESOURCES
ACPI_MODULE_NAME("rslist")
/*******************************************************************************
*
* FUNCTION: acpi_rs_convert_aml_to_resources
*
Reported by Cppcheck.
drivers/crypto/virtio/virtio_crypto_common.h
1 issues
Line: 27
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
spinlock_t lock;
/* Name of the tx queue: dataq.$index */
char name[32];
struct crypto_engine *engine;
};
struct virtio_crypto {
Reported by FlawFinder.
drivers/acpi/acpica/pswalk.c
1 issues
Line: 15
#include "acparser.h"
#define _COMPONENT ACPI_PARSER
ACPI_MODULE_NAME("pswalk")
/*******************************************************************************
*
* FUNCTION: acpi_ps_delete_parse_tree
*
Reported by Cppcheck.
drivers/cxl/mem.h
1 issues
Line: 75
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
size_t payload_size;
size_t lsa_size;
struct mutex mbox_mutex; /* Protects device mailbox and firmware */
char firmware_version[0x10];
unsigned long *enabled_cmds;
struct range pmem_range;
struct range ram_range;
};
Reported by FlawFinder.
drivers/gpu/drm/bridge/nwl-dsi.c
1 issues
Line: 867
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
phy_ref_rate = clk_get_rate(dsi->phy_ref_clk);
DRM_DEV_DEBUG_DRIVER(dev, "PHY at ref rate: %lu\n", phy_ref_rate);
/* Save the new desired phy config */
memcpy(&dsi->phy_cfg, &new_cfg, sizeof(new_cfg));
memcpy(&dsi->mode, adjusted_mode, sizeof(dsi->mode));
drm_mode_debug_printmodeline(adjusted_mode);
pm_runtime_get_sync(dev);
Reported by FlawFinder.
drivers/acpi/acpica/psparse.c
1 issues
Line: 28
#include "acnamesp.h"
#define _COMPONENT ACPI_PARSER
ACPI_MODULE_NAME("psparse")
/*******************************************************************************
*
* FUNCTION: acpi_ps_get_opcode_size
*
Reported by Cppcheck.
drivers/acpi/acpica/nsxfobj.c
1 issues
Line: 16
#include "acnamesp.h"
#define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME("nsxfobj")
/*******************************************************************************
*
* FUNCTION: acpi_get_type
*
Reported by Cppcheck.
drivers/devfreq/governor.h
1 issues
Line: 70
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
struct devfreq_governor {
struct list_head node;
const char name[DEVFREQ_NAME_LEN];
const u64 attrs;
const u64 flags;
int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
int (*event_handler)(struct devfreq *devfreq,
unsigned int event, void *data);
Reported by FlawFinder.
drivers/dio/dio.c
1 issues
Line: 242
Column: 17
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
dev->id = prid;
dev->ipl = DIO_IPL(va);
strcpy(dev->name,dio_getname(dev->id));
printk(KERN_INFO "select code %3d: ipl %d: ID %02X", dev->scode, dev->ipl, prid);
if (DIO_NEEDSSECID(prid))
printk(":%02X", secid);
printk(": %s\n", dev->name);
Reported by FlawFinder.