Skip to content

Commit

Permalink
Merge pull request #340 from pbrochart/realtek-4.4.x
Browse files Browse the repository at this point in the history
fix UBSAN: array-index-out-of-bounds
  • Loading branch information
CGarces authored May 7, 2024
2 parents 7ef8251 + 37600b1 commit 2741064
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions include/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ struct ieee_param {
struct {
u32 len;
u8 reserved[32];
u8 data[0];
u8 data[];
} wpa_ie;
struct {
int command;
Expand All @@ -323,7 +323,7 @@ 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 {
Expand All @@ -335,7 +335,7 @@ struct ieee_param {
} add_sta;
struct {
u8 reserved[2];/* for set max_num_sta */
u8 buf[0];
u8 buf[];
} bcn_ie;
#endif

Expand All @@ -346,7 +346,7 @@ struct ieee_param {
struct ieee_param_ex {
u32 cmd;
u8 sta_addr[ETH_ALEN];
u8 data[0];
u8 data[];
};

struct sta_data {
Expand Down Expand Up @@ -711,7 +711,7 @@ extern struct rate_section_ent rates_by_sections[];
struct ieee80211_info_element {
u8 id;
u8 len;
u8 data[0];
u8 data[];
} __attribute__((packed));

/*
Expand Down
2 changes: 1 addition & 1 deletion include/wlan_bssdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ typedef struct _NDIS_802_11_FIXED_IEs {
typedef struct _NDIS_802_11_VARIABLE_IEs {
UCHAR ElementID;
UCHAR Length;
UCHAR data[1];
UCHAR data[];
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;


Expand Down

0 comments on commit 2741064

Please sign in to comment.