net: wireless: ipw2x00: ipw2200.c: Cleaning up missing null-terminate after strncpy...
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sat, 9 Aug 2014 23:39:28 +0000 (01:39 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Aug 2014 18:43:51 +0000 (14:43 -0400)
Added a guaranteed null-terminate after call to strncpy.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ipw2x00/ipw2200.c

index c5aa404..389656b 100644 (file)
@@ -9853,6 +9853,7 @@ static int ipw_wx_get_wireless_mode(struct net_device *dev,
                strncpy(extra, "unknown", MAX_WX_STRING);
                break;
        }
+       extra[MAX_WX_STRING - 1] = '\0';
 
        IPW_DEBUG_WX("PRIV GET MODE: %s\n", extra);