Skip to content

Commit 2da2c58

Browse files
Rickard Strandqvistlinvjw
authored andcommitted
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>
1 parent 2d116b8 commit 2da2c58

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/wireless/ipw2x00/ipw2200.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9853,6 +9853,7 @@ static int ipw_wx_get_wireless_mode(struct net_device *dev,
98539853
strncpy(extra, "unknown", MAX_WX_STRING);
98549854
break;
98559855
}
9856+
extra[MAX_WX_STRING - 1] = '\0';
98569857

98579858
IPW_DEBUG_WX("PRIV GET MODE: %s\n", extra);
98589859

0 commit comments

Comments
 (0)