The following issues were found
include/linux/power/bq27xxx_battery.h
1 issues
Line: 41
Column: 8
CWE codes:
120
20
struct bq27xxx_device_info;
struct bq27xxx_access_methods {
int (*read)(struct bq27xxx_device_info *di, u8 reg, bool single);
int (*write)(struct bq27xxx_device_info *di, u8 reg, int value, bool single);
int (*read_bulk)(struct bq27xxx_device_info *di, u8 reg, u8 *data, int len);
int (*write_bulk)(struct bq27xxx_device_info *di, u8 reg, u8 *data, int len);
};
Reported by FlawFinder.
fs/btrfs/volumes.h
1 issues
Line: 385
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
u8 nparity; /* number of stripes worth of bytes to store
* parity information */
u8 mindev_error; /* error code if min devs requisite is unmet */
const char raid_name[8]; /* name of the raid */
u64 bg_flag; /* block group flag of the raid */
};
extern const struct btrfs_raid_attr btrfs_raid_array[BTRFS_NR_RAID_TYPES];
Reported by FlawFinder.
include/drm/drm_crtc.h
1 issues
Line: 1180
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
*
* The name of the CRTC's fence timeline.
*/
char timeline_name[32];
/**
* @self_refresh_data: Holds the state for the self refresh helpers
*
* Initialized via drm_self_refresh_helper_init().
Reported by FlawFinder.
include/drm/drm_dp_helper.h
1 issues
Line: 2008
Column: 50
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 drm_display_mode *drm_dp_downstream_mode(struct drm_device *dev,
const u8 dpcd[DP_RECEIVER_CAP_SIZE],
const u8 port_cap[4]);
int drm_dp_downstream_id(struct drm_dp_aux *aux, char id[6]);
void drm_dp_downstream_debug(struct seq_file *m,
const u8 dpcd[DP_RECEIVER_CAP_SIZE],
const u8 port_cap[4],
const struct edid *edid,
struct drm_dp_aux *aux);
Reported by FlawFinder.
include/drm/drm_drv.h
1 issues
Line: 201
Column: 8
CWE codes:
362
* 0 on success, a negative error code on failure, which will be
* promoted to userspace as the result of the open() system call.
*/
int (*open) (struct drm_device *, struct drm_file *);
/**
* @postclose:
*
* One of the driver callbacks when a new &struct drm_file is closed.
Reported by FlawFinder.
include/drm/drm_framebuffer.h
1 issues
Line: 136
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
/**
* @comm: Name of the process allocating the fb, used for fb dumping.
*/
char comm[TASK_COMM_LEN];
/**
* @format: framebuffer format information
*/
const struct drm_format_info *format;
Reported by FlawFinder.
include/drm/drm_gem.h
1 issues
Line: 65
Column: 8
CWE codes:
362
*
* This callback is optional.
*/
int (*open)(struct drm_gem_object *obj, struct drm_file *file);
/**
* @close:
*
* Called upon GEM handle release.
Reported by FlawFinder.
include/linux/power/charger-manager.h
1 issues
Line: 231
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
int emergency_stop;
char psy_name_buf[PSY_NAME_MAX + 1];
struct power_supply_desc charger_psy_desc;
struct power_supply *charger_psy;
u64 charging_start_time;
u64 charging_end_time;
Reported by FlawFinder.
include/drm/drm_modes.h
1 issues
Line: 378
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
*
* Human-readable name of the mode, filled out with drm_mode_set_name().
*/
char name[DRM_DISPLAY_MODE_LEN];
/**
* @status:
*
* Status of the mode, used to filter out modes not supported by the
Reported by FlawFinder.
include/linux/ssb/ssb_driver_gige.h
1 issues
Line: 108
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!dev)
return -ENODEV;
memcpy(macaddr, dev->dev->bus->sprom.et0mac, 6);
return 0;
}
/* Get the device phy address */
static inline int ssb_gige_get_phyaddr(struct pci_dev *pdev)
Reported by FlawFinder.