Browse Source

mac80211: fix agg_status debugfs file write

Initialize the buffer to all zeroes, otherwise the stack
data might be interpreted as the TID, which is likely to
fail completely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 11 years ago
parent
commit
c4d2ffac33
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/mac80211/debugfs_sta.c

+ 1 - 1
net/mac80211/debugfs_sta.c

@@ -195,7 +195,7 @@ static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
 static ssize_t sta_agg_status_write(struct file *file, const char __user *userbuf,
 				    size_t count, loff_t *ppos)
 {
-	char _buf[12], *buf = _buf;
+	char _buf[12] = {}, *buf = _buf;
 	struct sta_info *sta = file->private_data;
 	bool start, tx;
 	unsigned long tid;