Skip to content

Commit

Permalink
net: wireless: ipw2x00: ipw2200.c: Cleaning up missing null-terminate…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Rickard Strandqvist authored and John W. Linville committed Aug 11, 2014
1 parent 2d116b8 commit 2da2c58
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/ipw2x00/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 2da2c58

Please sign in to comment.