Skip to contentSkip to conversation

nets: fix a buffer overrun

PATCH Applied Jianjun Kong 2 participants 2 messages Nov 8, 2008 – Nov 11, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nets: fix a buffer overrun

net/mac80211/debugfs_sta.c
The trailing zero was written to state[4], it's out of bounds.

---
 net/mac80211/debugfs_sta.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/debugfs_sta.c +1 -1
index 189d0ba..b85c4f2 100644
@@ -199,7 +199,7 @@ static ssize_t sta_agg_status_write(struct file *file,
 		/* toggle Rx aggregation command */
 		tid_num = tid_num - 100;
 		if (tid_static_rx[tid_num] == 1) {
-			strcpy(state, "off ");
+			strcpy(state, "off");
 			ieee80211_sta_stop_rx_ba_session(sta->sdata, da, tid_num, 0,
 					WLAN_REASON_QSTA_REQUIRE_SETUP);
 			sta->ampdu_mlme.tid_state_rx[tid_num] |=
Signature · 1 line
1.5.6.3