瀏覽代碼

net: wireless: ipw2x00: ipw2200.c: Cleaning up missing null-terminate after strncpy call

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>
Rickard Strandqvist 11 年之前
父節點
當前提交
2da2c5854e
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/wireless/ipw2x00/ipw2200.c

+ 1 - 0
drivers/net/wireless/ipw2x00/ipw2200.c

@@ -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);