From: Johannes Berg Date: Wed, 8 Jan 2014 21:22:05 +0000 (+0100) Subject: mac80211: fix agg_status debugfs file write X-Git-Tag: v3.15-rc1~113^2~18^2^2~47^2~81 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=c4d2ffac330fd013944654f11cdfc06ff5ca9bf4;p=cascardo%2Flinux.git 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 --- diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 80194b557a0c..2ecb4deddb5d 100644 --- a/net/mac80211/debugfs_sta.c +++ b/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;