The following issues were found
drivers/crypto/omap-crypto.c
1 issues
Line: 184
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
srcb = kmap_atomic(sg_page(src)) + srco + src->offset;
dstb = kmap_atomic(sg_page(dst)) + dsto + dst->offset;
memcpy(dstb, srcb, amt);
flush_dcache_page(sg_page(dst));
kunmap_atomic(srcb);
kunmap_atomic(dstb);
Reported by FlawFinder.
drivers/acpi/acpica/utmath.c
1 issues
Line: 12
#include "accommon.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME("utmath")
/* Structures used only for 64-bit divide */
typedef struct uint64_struct {
u32 lo;
u32 hi;
Reported by Cppcheck.
drivers/acpi/acpica/utlock.c
1 issues
Line: 14
#include "accommon.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME("utlock")
/*******************************************************************************
*
* FUNCTION: acpi_ut_create_rw_lock
* acpi_ut_delete_rw_lock
Reported by Cppcheck.
drivers/acpi/acpica/uteval.c
1 issues
Line: 15
#include "acnamesp.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME("uteval")
/*******************************************************************************
*
* FUNCTION: acpi_ut_evaluate_object
*
Reported by Cppcheck.
drivers/crypto/qat/qat_c3xxx/adf_drv.c
1 issues
Line: 77
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 adf_accel_dev *accel_dev;
struct adf_accel_pci *accel_pci_dev;
struct adf_hw_device_data *hw_data;
char name[ADF_DEVICE_NAME_LENGTH];
unsigned int i, bar_nr;
unsigned long bar_mask;
int ret;
switch (ent->device) {
Reported by FlawFinder.
drivers/crypto/qat/qat_c3xxxvf/adf_drv.c
1 issues
Line: 79
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 adf_accel_dev *pf;
struct adf_accel_pci *accel_pci_dev;
struct adf_hw_device_data *hw_data;
char name[ADF_DEVICE_NAME_LENGTH];
unsigned int i, bar_nr;
unsigned long bar_mask;
int ret;
switch (ent->device) {
Reported by FlawFinder.
drivers/crypto/qat/qat_c62x/adf_drv.c
1 issues
Line: 77
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 adf_accel_dev *accel_dev;
struct adf_accel_pci *accel_pci_dev;
struct adf_hw_device_data *hw_data;
char name[ADF_DEVICE_NAME_LENGTH];
unsigned int i, bar_nr;
unsigned long bar_mask;
int ret;
switch (ent->device) {
Reported by FlawFinder.
drivers/crypto/qat/qat_c62xvf/adf_drv.c
1 issues
Line: 79
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 adf_accel_dev *pf;
struct adf_accel_pci *accel_pci_dev;
struct adf_hw_device_data *hw_data;
char name[ADF_DEVICE_NAME_LENGTH];
unsigned int i, bar_nr;
unsigned long bar_mask;
int ret;
switch (ent->device) {
Reported by FlawFinder.
drivers/crypto/qat/qat_common/adf_cfg.c
1 issues
Line: 196
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (sec)
keyval = adf_cfg_key_value_find(sec, key_name);
if (keyval) {
memcpy(val, keyval->val, ADF_CFG_MAX_VAL_LEN_IN_BYTES);
return 0;
}
return -ENODATA;
}
Reported by FlawFinder.
drivers/crypto/qat/qat_common/adf_cfg_common.h
1 issues
Line: 51
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 bus;
__u8 dev;
__u8 fun;
char name[MAX_DEVICE_NAME_SIZE];
};
#define ADF_CTL_IOC_MAGIC 'a'
#define IOCTL_CONFIG_SYS_RESOURCE_PARAMETERS _IOW(ADF_CTL_IOC_MAGIC, 0, \
struct adf_user_cfg_ctl_data)
Reported by FlawFinder.