The following issues were found
drivers/input/touchscreen/s6sy761.c
1 issues
Line: 280
Column: 9
CWE codes:
120
Suggestion:
Use sprintf_s, snprintf, or vsnprintf
{
struct s6sy761_data *sdata = dev_get_drvdata(dev);
return sprintf(buf, "%#x\n", sdata->devid);
}
static DEVICE_ATTR(devid, 0444, s6sy761_sysfs_devid, NULL);
static struct attribute *s6sy761_sysfs_attrs[] = {
Reported by FlawFinder.
drivers/gpu/drm/exynos/exynos_drm_gsc.c
1 issues
Line: 128
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 gsc_driverdata {
const struct drm_exynos_ipp_limit *limits;
int num_limits;
const char *clk_names[GSC_MAX_CLOCKS];
int num_clocks;
};
/* 8-tap Filter Coefficient */
static const int h_coef_8t[GSC_COEF_RATIO][GSC_COEF_ATTR][GSC_COEF_H_8T] = {
Reported by FlawFinder.
drivers/gpu/drm/kmb/kmb_dsi.c
1 issues
Line: 42
};
static struct mipi_tx_frame_cfg mipitx_frame0_cfg = {
.sections[0] = &mipi_tx_frame0_sect_cfg,
.sections[1] = NULL,
.sections[2] = NULL,
.sections[3] = NULL,
.vsync_width = 5,
.v_backporch = 36,
Reported by Cppcheck.
drivers/gpu/drm/i915/display/intel_acpi.c
1 issues
Line: 149
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 bool intel_dsm_detect(void)
{
acpi_handle dhandle = NULL;
char acpi_method_name[255] = { 0 };
struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name};
struct pci_dev *pdev = NULL;
int vga_count = 0;
while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
Reported by FlawFinder.
drivers/input/touchscreen/sur40.c
1 issues
Line: 227
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 bulk_in_epaddr;
u8 vsvideo;
char phys[64];
};
struct sur40_buffer {
struct vb2_v4l2_buffer vb;
struct list_head list;
Reported by FlawFinder.
drivers/gpu/drm/i2c/ch7006_priv.h
1 issues
Line: 149
#define __bitf(src, bitfield, x) \
(((x) >> (src) << (0 ? bitfield)) & __mask(src, bitfield))
#define bitf(bitfield, x) __bitf(bitfield, x)
#define bitfs(bitfield, s) __bitf(bitfield, bitfield##_##s)
#define setbitf(state, reg, bitfield, x) \
state->regs[reg] = (state->regs[reg] & ~mask(reg##_##bitfield)) \
| bitf(reg##_##bitfield, x)
#define __unbitf(src, bitfield, x) \
Reported by Cppcheck.
drivers/gpu/drm/hyperv/hyperv_drm_proto.c
1 issues
Line: 390
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (msg->vid_hdr.type == SYNTHVID_VERSION_RESPONSE ||
msg->vid_hdr.type == SYNTHVID_RESOLUTION_RESPONSE ||
msg->vid_hdr.type == SYNTHVID_VRAM_LOCATION_ACK) {
memcpy(hv->init_buf, msg, VMBUS_MAX_PACKET_SIZE);
complete(&hv->wait);
return;
}
if (msg->vid_hdr.type == SYNTHVID_FEATURE_CHANGE)
Reported by FlawFinder.
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
1 issues
Line: 572
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (ret)
goto err_submit_objects;
memcpy(submit->cmdbuf.vaddr, stream, args->stream_size);
ret = submit_lock_objects(submit, &ticket);
if (ret)
goto err_submit_objects;
Reported by FlawFinder.
drivers/input/touchscreen/tps6507x-ts.c
1 issues
Line: 44
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 device *dev;
struct input_dev *input;
struct tps6507x_dev *mfd;
char phys[32];
struct ts_event tc;
u16 min_pressure;
bool pendown;
};
Reported by FlawFinder.
drivers/input/touchscreen/ts4800-ts.c
1 issues
Line: 37
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 ts4800_ts {
struct input_dev *input;
struct device *dev;
char phys[32];
void __iomem *base;
struct regmap *regmap;
unsigned int reg;
unsigned int bit;
Reported by FlawFinder.