The following issues were found
drivers/input/keyboard/hilkbd.c
1 issues
Line: 102
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
unsigned char c;
int valid;
unsigned char data[16];
unsigned int ptr;
spinlock_t lock;
void *dev_id; /* native bus device */
} hil_dev;
Reported by FlawFinder.
drivers/gpu/drm/i915/gem/i915_gem_context_types.h
1 issues
Line: 185
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
* name, pid and user handle in order to uniquely identify the
* context in messages.
*/
char name[TASK_COMM_LEN + 8];
struct {
spinlock_t lock;
struct list_head engines;
} stale;
Reported by FlawFinder.
drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c
1 issues
Line: 91
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
u32 data = nvkm_rd32(device, 0x102194);
u32 inst = nvkm_rd32(device, 0x102188) & 0x7fffffff;
unsigned long flags;
char msg[128];
chan = nvkm_fifo_chan_inst(fifo, (u64)inst << 12, &flags);
if (stat) {
nvkm_snprintbf(msg, sizeof(msg), g84_cipher_intr_mask, stat);
nvkm_error(subdev, "%08x [%s] ch %d [%010llx %s] "
Reported by FlawFinder.
drivers/input/keyboard/jornada720_kbd.c
1 issues
Line: 105
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
platform_set_drvdata(pdev, jornadakbd);
memcpy(jornadakbd->keymap, jornada_std_keymap,
sizeof(jornada_std_keymap));
jornadakbd->input = input_dev;
input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
input_dev->name = "HP Jornada 720 keyboard";
Reported by FlawFinder.
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
1 issues
Line: 29
Column: 7
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
#include <core/option.h>
#include <subdev/mc.h>
const char *
nvkm_subdev_type[NVKM_SUBDEV_NR] = {
#define NVKM_LAYOUT_ONCE(type,data,ptr,...) [type] = #ptr,
#define NVKM_LAYOUT_INST(A...) NVKM_LAYOUT_ONCE(A)
#include <core/layout.h>
#undef NVKM_LAYOUT_ONCE
Reported by FlawFinder.
drivers/gpu/drm/nouveau/nvkm/core/object.c
1 issues
Line: 41
CWE codes:
908
if (handle < object->object)
node = node->rb_left;
else
if (handle > object->object)
node = node->rb_right;
else
goto done;
}
return ERR_PTR(-ENOENT);
Reported by Cppcheck.
drivers/gpu/drm/nouveau/nvkm/core/notify.c
1 issues
Line: 108
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
spin_unlock_irqrestore(&event->refs_lock, flags);
if (test_bit(NVKM_NOTIFY_WORK, ¬ify->flags)) {
memcpy((void *)notify->data, data, size);
schedule_work(¬ify->work);
} else {
notify->data = data;
nvkm_notify_func(notify);
notify->data = NULL;
Reported by FlawFinder.
drivers/gpu/drm/nouveau/nvkm/core/client.c
1 issues
Line: 259
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
nvkm_client_fini(struct nvkm_object *object, bool suspend)
{
struct nvkm_client *client = nvkm_client(object);
const char *name[2] = { "fini", "suspend" };
int i;
nvif_debug(object, "%s notify\n", name[suspend]);
for (i = 0; i < ARRAY_SIZE(client->notify); i++)
nvkm_client_notify_put(client, i);
return 0;
Reported by FlawFinder.
drivers/input/keyboard/matrix_keypad.c
1 issues
Line: 161
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
input_sync(input_dev);
memcpy(keypad->last_key_state, new_state, sizeof(new_state));
activate_all_cols(pdata, true);
/* Enable IRQs again */
spin_lock_irq(&keypad->lock);
Reported by FlawFinder.
drivers/input/keyboard/mtk-pmic-keys.c
1 issues
Line: 58
};
static const struct mtk_pmic_regs mt6397_regs = {
.keys_regs[MTK_PMIC_PWRKEY_INDEX] =
MTK_PMIC_KEYS_REGS(MT6397_CHRSTATUS,
0x8, MT6397_INT_RSV, 0x10),
.keys_regs[MTK_PMIC_HOMEKEY_INDEX] =
MTK_PMIC_KEYS_REGS(MT6397_OCSTATUS2,
0x10, MT6397_INT_RSV, 0x8),
Reported by Cppcheck.