The following issues were found
drivers/gpu/drm/i915/display/intel_tv.c
1 issues
Line: 1882
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 intel_encoder *intel_encoder;
struct intel_connector *intel_connector;
u32 tv_dac_on, tv_dac_off, save_tv_dac;
const char *tv_format_names[ARRAY_SIZE(tv_modes)];
int i, initial_mode = 0;
struct drm_connector_state *state;
if ((intel_de_read(dev_priv, TV_CTL) & TV_FUSE_STATE_MASK) == TV_FUSE_STATE_DISABLED)
return;
Reported by FlawFinder.
drivers/input/misc/adxl34x-spi.c
1 issues
Line: 40
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 reg, unsigned char val)
{
struct spi_device *spi = to_spi_device(dev);
unsigned char buf[2];
buf[0] = ADXL34X_WRITECMD(reg);
buf[1] = val;
return spi_write(spi, buf, sizeof(buf));
Reported by FlawFinder.
drivers/gpu/drm/nouveau/include/nvkm/engine/dma.h
1 issues
Line: 14
Column: 6
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
struct nvkm_object object;
u32 target;
u32 access;
u64 start;
u64 limit;
};
struct nvkm_dma {
Reported by FlawFinder.
drivers/input/misc/adxl34x.h
1 issues
Line: 18
Column: 8
CWE codes:
120
20
struct adxl34x_bus_ops {
u16 bustype;
int (*read)(struct device *, unsigned char);
int (*read_block)(struct device *, unsigned char, int, void *);
int (*write)(struct device *, unsigned char, unsigned char);
};
void adxl34x_suspend(struct adxl34x *ac);
Reported by FlawFinder.
drivers/input/misc/apanel.c
1 issues
Line: 156
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
idev->phys = "apanel/input0";
idev->id.bustype = BUS_HOST;
memcpy(ap->keymap, apanel_keymap, sizeof(apanel_keymap));
idev->keycode = ap->keymap;
idev->keycodesize = sizeof(ap->keymap[0]);
idev->keycodemax = (device_chip[APANEL_DEV_CDBTN] != CHIP_NONE) ? 12 : 4;
set_bit(EV_KEY, idev->evbit);
Reported by FlawFinder.
drivers/gpu/drm/nouveau/include/nvkm/core/option.h
1 issues
Line: 15
Column: 6
CWE codes:
126
static inline int
strncasecmpz(const char *str, const char *cmp, size_t len)
{
if (strlen(cmp) != len)
return len;
return strncasecmp(str, cmp, len);
}
#endif
Reported by FlawFinder.
drivers/input/misc/atmel_captouch.c
1 issues
Line: 118
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return -ECOMM;
}
memcpy(data, &capdev->xfer_buf[2], len);
return 0;
}
/*
Reported by FlawFinder.
drivers/gpu/drm/nouveau/include/nvkm/core/firmware.h
1 issues
Line: 20
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
#define nvkm_firmware_load(s,l,o,p...) ({ \
struct nvkm_subdev *_s = (s); \
const char *_opts = (o); \
char _option[32]; \
typeof(l[0]) *_list = (l), *_next, *_fwif = NULL; \
int _ver, _fwv, _ret = 0; \
\
snprintf(_option, sizeof(_option), "Nv%sFw", _opts); \
_ver = nvkm_longopt(_s->device->cfgopt, _option, -2); \
Reported by FlawFinder.
drivers/gpu/drm/nouveau/include/nvkm/core/client.h
1 issues
Line: 9
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 nvkm_client {
struct nvkm_object object;
char name[32];
u64 device;
u32 debug;
struct nvkm_client_notify *notify[32];
struct rb_root objroot;
Reported by FlawFinder.
drivers/input/misc/cma3000_d0x.c
1 issues
Line: 74
Column: 18
CWE codes:
120
20
};
#define CMA3000_READ(data, reg, msg) \
(data->bus_ops->read(data->dev, reg, msg))
#define CMA3000_SET(data, reg, val, msg) \
((data)->bus_ops->write(data->dev, reg, val, msg))
/*
* Conversion for each of the eight modes to g, depending
Reported by FlawFinder.