]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: add NULL terminator to debugfs_netdev write buf
authorEliad Peller <eliad@wizery.com>
Wed, 14 Mar 2012 14:15:02 +0000 (16:15 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 15 Mar 2012 17:40:34 +0000 (13:40 -0400)
commit0f5c7d86707fcf82879aa493881e7ea8dd5a1702
treedb55e957f411c7e95d054b53e23ab561f9ad8f84
parent8538a889179f67df85cc58990f018c79966451b0
mac80211: add NULL terminator to debugfs_netdev write buf

Some debugfs write functions call kstrto* functions, which
assume the string is null-terminated. Make it valid by changing
ieee80211_if_write() to use static buffer instead of allocating
one, and set the last char to NULL.

(The write functions try to parse some integer/mac address,
so 64 bytes buffer should be enough)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/debugfs_netdev.c