Return-path: Received: from mail-la0-f48.google.com ([209.85.215.48]:39629 "EHLO mail-la0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751380AbaHIXiB (ORCPT ); Sat, 9 Aug 2014 19:38:01 -0400 Received: by mail-la0-f48.google.com with SMTP id gl10so5596260lab.21 for ; Sat, 09 Aug 2014 16:37:59 -0700 (PDT) From: Rickard Strandqvist To: Stanislav Yakovlev , "John W. Linville" Cc: Rickard Strandqvist , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: wireless: ipw2x00: ipw2200.c: Cleaning up missing null-terminate after strncpy call Date: Sun, 10 Aug 2014 01:39:28 +0200 Message-Id: <1407627568-24125-1-git-send-email-rickard_strandqvist@spectrumdigital.se> (sfid-20140810_013845_322948_C3D2E7C9) Sender: linux-wireless-owner@vger.kernel.org List-ID: Added a guaranteed null-terminate after call to strncpy. Signed-off-by: Rickard Strandqvist --- drivers/net/wireless/ipw2x00/ipw2200.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index c5aa404..389656b 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/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); -- 1.7.10.4