The following issues were found

drivers/leds/trigger/ledtrig-backlight.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 65 Column: 9 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              {
	struct bl_trig_notifier *n = led_trigger_get_drvdata(dev);

	return sprintf(buf, "%u\n", n->invert);
}

static ssize_t bl_trig_invert_store(struct device *dev,
		struct device_attribute *attr, const char *buf, size_t num)
{

            

Reported by FlawFinder.

drivers/leds/trigger/ledtrig-cpu.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 35 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 led_trigger_cpu {
	bool is_active;
	char name[MAX_NAME_LEN];
	struct led_trigger *_trig;
};

static DEFINE_PER_CPU(struct led_trigger_cpu, cpu_trig);


            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/nvkm/engine/disp/corenv50.c
1 issues
syntax error
Error

Line: 175

              	/* deactivate channel */
	nvkm_mask(device, 0x610200, 0x00000010, 0x00000000);
	nvkm_mask(device, 0x610200, 0x00000003, 0x00000000);
	if (nvkm_msec(device, 2000,
		if (!(nvkm_rd32(device, 0x610200) & 0x001e0000))
			break;
	) < 0) {
		nvkm_error(subdev, "core fini: %08x\n",
			   nvkm_rd32(device, 0x610200));

            

Reported by Cppcheck.

drivers/gpu/drm/nouveau/nvkm/engine/disp/coregp102.c
1 issues
syntax error
Error

Line: 43

              	nvkm_wr32(device, 0x610490, 0x01000013);

	/* wait for it to go inactive */
	if (nvkm_msec(device, 2000,
		if (!(nvkm_rd32(device, 0x610490) & 0x80000000))
			break;
	) < 0) {
		nvkm_error(subdev, "core init: %08x\n",
			   nvkm_rd32(device, 0x610490));

            

Reported by Cppcheck.

drivers/input/keyboard/applespi_trace.h
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              		__entry->evt_type = evt_type;
		__entry->pkt_type = pkt_type;
		__entry->len = len;
		memcpy(__get_dynamic_array(buf), buf, len);
	),

	TP_printk("%-6s: %s",
		  __print_symbolic(__entry->pkt_type,
				   { PT_READ, "read" },

            

Reported by FlawFinder.

drivers/input/keyboard/atakbd.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 66 Column: 17 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 unsigned char atakbd_keycode[0x73] = {	/* American layout */
	[1]	 = KEY_ESC,
	[2]	 = KEY_1,
	[3]	 = KEY_2,
	[4]	 = KEY_3,
	[5]	 = KEY_4,

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/nvkm/engine/disp/coregf119.c
1 issues
syntax error
Error

Line: 178

              	/* deactivate channel */
	nvkm_mask(device, 0x610490, 0x00000010, 0x00000000);
	nvkm_mask(device, 0x610490, 0x00000003, 0x00000000);
	if (nvkm_msec(device, 2000,
		if (!(nvkm_rd32(device, 0x610490) & 0x001e0000))
			break;
	) < 0) {
		nvkm_error(subdev, "core fini: %08x\n",
			   nvkm_rd32(device, 0x610490));

            

Reported by Cppcheck.

drivers/input/keyboard/cros_ec_keyb.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              			 ret, result_size);
		ret = -EPROTO;
	} else {
		memcpy(result, msg->data, result_size);
		ret = 0;
	}

	kfree(msg);


            

Reported by FlawFinder.

drivers/input/keyboard/davinci_keyscan.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              		return -ENOMEM;
	}

	memcpy(davinci_ks->keymap, pdata->keymap,
		sizeof(unsigned short) * pdata->keymapsize);

	key_dev = input_allocate_device();
	if (!key_dev) {
		dev_dbg(dev, "could not allocate input device\n");

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
1 issues
syntax error: { . dtor
Error

Line: 160

              
static const struct nvkm_oproxy_func
nvkm_disp_class = {
	.dtor[1] = nvkm_disp_class_del,
};

static int
nvkm_disp_class_new(struct nvkm_device *device,
		    const struct nvkm_oclass *oclass, void *data, u32 size,

            

Reported by Cppcheck.