From: Dan Aloni Date: Wed, 24 Jun 2009 19:34:39 +0000 (+0300) Subject: Staging: prevent rtl8192su from crashing dev_ioctl in SIOCGIWNAME X-Git-Tag: v2.6.31-rc3~2^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91fca6da389b897483b4c1edea29885172989fda;p=pandora-kernel.git Staging: prevent rtl8192su from crashing dev_ioctl in SIOCGIWNAME (adapted from the rtl8187se patch) ieee80211_wx_get_name() ignores sizeof(wrqu->name) which is IFNAMSIZ (16), and on certain conditions, the concatenated string will be larger than IFNAMSIZ including the terminating zero. length ("802.11" ++ "b" ++ "/g" ++ " linked" ++ "\x00") == 17 This fix uses strl{cpy,cat} in addition to the reduction of the total possible length of the output string by a char. It can be applied to 2.6.30-stable as well. Signed-off-by: Dan Aloni Cc: Bartlomiej Zolnierkiewicz Cc: stable Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed