1
0
mirror of https://github.com/morrownr/8821cu-20210916.git synced 2024-11-22 05:24:47 +00:00

fix UBSAN: array-index-out-of-bounds

This commit is contained in:
morrownr 2024-03-18 14:44:05 -05:00
parent 0d5a059cf5
commit 01cc261363
2 changed files with 8 additions and 8 deletions

View File

@ -335,7 +335,7 @@ typedef struct ieee_param {
struct {
u32 len;
u8 reserved[32];
u8 data[0];
u8 data[];
} wpa_ie;
struct {
int command;
@ -348,7 +348,7 @@ typedef struct ieee_param {
u8 idx;
u8 seq[8]; /* sequence counter (set: RX, get: TX) */
u16 key_len;
u8 key[0];
u8 key[];
} crypt;
#ifdef CONFIG_AP_MODE
struct {
@ -360,7 +360,7 @@ typedef struct ieee_param {
} add_sta;
struct {
u8 reserved[2];/* for set max_num_sta */
u8 buf[0];
u8 buf[];
} bcn_ie;
#endif
@ -371,7 +371,7 @@ typedef struct ieee_param {
typedef struct ieee_param_ex {
u32 cmd;
u8 sta_addr[ETH_ALEN];
u8 data[0];
u8 data[];
} ieee_param_ex;
struct sta_data {
@ -1177,7 +1177,7 @@ struct ieee80211_info_element_hdr {
struct ieee80211_info_element {
u8 id;
u8 len;
u8 data[0];
u8 data[];
} __attribute__((packed));
#endif
@ -1249,7 +1249,7 @@ struct ieee80211_txb {
u16 reserved;
u16 frag_size;
u16 payload_size;
struct sk_buff *fragments[0];
struct sk_buff *fragments[];
};

View File

@ -65,7 +65,7 @@ typedef struct _NDIS_802_11_FIXED_IEs {
typedef struct _NDIS_802_11_VARIABLE_IEs {
u8 ElementID;
u8 Length;
u8 data[1];
u8 data[];
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
typedef enum _NDIS_802_11_AUTHENTICATION_MODE {
@ -150,7 +150,7 @@ typedef struct _NDIS_802_11_FIXED_IEs {
typedef struct _NDIS_802_11_VARIABLE_IEs {
u8 ElementID;
u8 Length;
u8 data[1];
u8 data[];
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
typedef enum _NDIS_802_11_AUTHENTICATION_MODE {