The following issues were found
drivers/gpu/drm/amd/pm/powerplay/smumgr/vegam_smumgr.c
1 issues
Line: 1133
&table->ACPILevel.MinVoltage, &mvdd);
PP_ASSERT_WITH_CODE(!result,
"Cannot find ACPI VDDC voltage value "
"in Clock Dependency Table",
);
result = vegam_calculate_sclk_params(hwmgr, sclk_frequency,
&(table->ACPILevel.SclkSetting));
PP_ASSERT_WITH_CODE(!result,
Reported by Cppcheck.
drivers/bus/fsl-mc/fsl-mc-private.h
1 issues
Line: 428
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
* interfaces ("dpsw", "dpdmux"); for others, always set to 0
*/
struct dprc_endpoint {
char type[16];
int id;
u16 if_id;
};
int dprc_get_connection(struct fsl_mc_io *mc_io,
Reported by FlawFinder.
drivers/bus/imx-weim.c
1 issues
Line: 182
Column: 4
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
base + cs_idx * devtype->cs_stride + i * 4);
if (!cst->is_applied) {
cst->is_applied = true;
memcpy(cst->regs, value,
devtype->cs_regs_count * sizeof(u32));
}
}
return 0;
Reported by FlawFinder.
drivers/bus/mhi/core/debugfs.c
1 issues
Line: 255
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 seq_file *m = file->private_data;
struct mhi_controller *mhi_cntrl = m->private;
struct mhi_device *mhi_dev = mhi_cntrl->mhi_dev;
char buf[16];
int ret = -EINVAL;
if (copy_from_user(&buf, ubuf, min_t(size_t, sizeof(buf) - 1, count)))
return -EFAULT;
Reported by FlawFinder.
drivers/bus/mips_cdmm.c
1 issues
Line: 98
Column: 9
CWE codes:
134
Suggestion:
Make format string constant
struct device_attribute *attr, char *buf) \
{ \
struct mips_cdmm_device *dev = to_mips_cdmm_device(_dev); \
return sprintf(buf, fmt, arg); \
} \
static DEVICE_ATTR_RO(name);
CDMM_ATTR(cpu, "%u\n", dev->cpu);
CDMM_ATTR(type, "0x%02x\n", dev->type);
Reported by FlawFinder.
drivers/bus/moxtet.c
1 issues
Line: 60
Column: 9
CWE codes:
134
Suggestion:
Make format string constant
char *buf) \
{ \
struct moxtet_device *mdev = to_moxtet_device(dev); \
return sprintf(buf, (fmt), __VA_ARGS__); \
} \
static DEVICE_ATTR_RO(module_##name)
DEF_MODULE_ATTR(id, "0x%x\n", mdev->id);
DEF_MODULE_ATTR(name, "%s\n", mox_module_name(mdev->id));
Reported by FlawFinder.
drivers/auxdisplay/cfag12864b.c
1 issues
Line: 284
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
}
memcpy(cfag12864b_cache, cfag12864b_buffer, CFAG12864B_SIZE);
}
if (cfag12864b_updating)
cfag12864b_queue();
}
Reported by FlawFinder.
drivers/auxdisplay/arm-charlcd.c
1 issues
Line: 229
Column: 18
CWE codes:
126
charlcd_4bit_command(lcd, HD_SET_DDRAM | offset);
/* Send string */
for (i = 0; i < strlen(str) && i < 0x28; i++)
charlcd_4bit_char(lcd, str[i]);
}
static void charlcd_4bit_init(struct charlcd *lcd)
{
Reported by FlawFinder.
drivers/atm/uPD98402.c
1 issues
Line: 90
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
static int get_sense(struct atm_dev *dev,u8 __user *arg)
{
unsigned long flags;
unsigned char s[3];
spin_lock_irqsave(&PRIV(dev)->lock, flags);
s[0] = GET(C11R);
s[1] = GET(C12R);
s[2] = GET(C13R);
Reported by FlawFinder.
crypto/ecdh.c
1 issues
Line: 40
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return ecc_gen_privkey(ctx->curve_id, ctx->ndigits,
ctx->private_key);
memcpy(ctx->private_key, params.key, params.key_size);
if (ecc_is_key_valid(ctx->curve_id, ctx->ndigits,
ctx->private_key, params.key_size) < 0) {
memzero_explicit(ctx->private_key, params.key_size);
return -EINVAL;
Reported by FlawFinder.