The following issues were found
net/mac80211/mesh_ps.c
1 issues
Line: 39
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
nullfunc->duration_id = 0;
nullfunc->seq_ctrl = 0;
/* no address resolution for this frame -> set addr 1 immediately */
memcpy(nullfunc->addr1, sta->sta.addr, ETH_ALEN);
skb_put_zero(skb, 2); /* append QoS control field */
ieee80211_mps_set_frame_flags(sdata, sta, nullfunc);
return skb;
}
Reported by FlawFinder.
net/mac80211/ocb.c
1 issues
Line: 92
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
struct ieee80211_sub_if_data *sdata = sta->sdata;
u8 addr[ETH_ALEN];
memcpy(addr, sta->sta.addr, ETH_ALEN);
ocb_dbg(sdata, "Adding new IBSS station %pM (dev=%s)\n",
addr, sdata->name);
sta_info_move_state(sta, IEEE80211_STA_AUTH);
Reported by FlawFinder.
include/misc/ocxl.h
1 issues
Line: 23
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 ocxl_afu_config {
u8 idx;
int dvsec_afu_control_pos; /* offset of AFU control DVSEC */
char name[OCXL_AFU_NAME_SZ];
u8 version_major;
u8 version_minor;
u8 afuc_type;
u8 afum_type;
u8 profile;
Reported by FlawFinder.
include/media/videobuf2-core.h
1 issues
Line: 630
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 vb2_fileio_data *fileio;
struct vb2_threadio_data *threadio;
char name[32];
#ifdef CONFIG_VIDEO_ADV_DEBUG
/*
* Counters for how often these queue-related ops are
* called. Used to check for unbalanced ops.
Reported by FlawFinder.
include/media/v4l2-fwnode.h
1 issues
Line: 41
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
*/
struct v4l2_fwnode_bus_mipi_csi2 {
unsigned int flags;
unsigned char data_lanes[V4L2_FWNODE_CSI2_MAX_DATA_LANES];
unsigned char clock_lane;
unsigned char num_data_lanes;
bool lane_polarities[1 + V4L2_FWNODE_CSI2_MAX_DATA_LANES];
};
Reported by FlawFinder.
include/linux/sunrpc/xdr.h
1 issues
Line: 167
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
static inline __be32 *
xdr_decode_opaque_fixed(__be32 *p, void *ptr, unsigned int len)
{
memcpy(ptr, p, len);
return p + XDR_QUADLEN(len);
}
static inline void xdr_netobj_dup(struct xdr_netobj *dst,
struct xdr_netobj *src, gfp_t gfp_mask)
Reported by FlawFinder.
include/media/v4l2-flash-led-class.h
1 issues
Line: 64
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
* @has_external_strobe: external strobe capability
*/
struct v4l2_flash_config {
char dev_name[32];
struct led_flash_setting intensity;
u32 flash_faults;
unsigned int has_external_strobe:1;
};
Reported by FlawFinder.
include/media/v4l2-device.h
1 issues
Line: 52
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 media_device *mdev;
struct list_head subdevs;
spinlock_t lock;
char name[V4L2_DEVICE_NAME_SIZE];
void (*notify)(struct v4l2_subdev *sd,
unsigned int notification, void *arg);
struct v4l2_ctrl_handler *ctrl_handler;
struct v4l2_prio_state prio;
struct kref ref;
Reported by FlawFinder.
include/media/v4l2-ctrls.h
1 issues
Line: 133
Column: 9
CWE codes:
126
Suggestion:
This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it
* otherwise.
*/
struct v4l2_ctrl_type_ops {
bool (*equal)(const struct v4l2_ctrl *ctrl, u32 idx,
union v4l2_ctrl_ptr ptr1,
union v4l2_ctrl_ptr ptr2);
void (*init)(const struct v4l2_ctrl *ctrl, u32 idx,
union v4l2_ctrl_ptr ptr);
void (*log)(const struct v4l2_ctrl *ctrl);
Reported by FlawFinder.
include/media/tveeprom.h
1 issues
Line: 89
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 model;
u32 revision;
u32 serial_number;
char rev_str[5];
u8 MAC_address[ETH_ALEN];
};
/**
* tveeprom_hauppauge_analog - Fill struct tveeprom using the contents
Reported by FlawFinder.