From patchwork Sat Aug 9 23:39:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4703541 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B42489F377 for ; Sat, 9 Aug 2014 23:38:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA0CE20145 for ; Sat, 9 Aug 2014 23:38:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB5F920149 for ; Sat, 9 Aug 2014 23:38:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751500AbaHIXiD (ORCPT ); Sat, 9 Aug 2014 19:38:03 -0400 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=F/PhhoXYAmIt43et6H7vg33ol+d5DB9dQwlWltbG2l4=; b=jKDJDFn/lQeP5odqv1IA473ekAGmobEAb00BeXgKcsrC3GpbLKevFKtMDI1ORnkUip K/gFuU3TZl1h2AH8JRklYz3VPypeUEu7hm/2mZCzj68Bkm+N7ay7nCCOFNs5CUEpqgbq 6rguNvwZgq7djsCjrig3oN3Z2zctscpixUPL4/asadgIHVY7mF0j2/HCpqhdTaW3B4WV rdIj3J91ooqf4a/j4NSXUXieV7Hc4OCyEn1DXew8X4Is43I4lCCKaUlUExSeF8puD4c5 7fzWdJ9FoQpHh65wMAXXBpOwfpUouZOgU6YVdxCZTT3s1OKNM6dU1TB3pMFTRJL8ciol vZVQ== X-Gm-Message-State: ALoCoQmlGWOtkPSliJi3xZGiaL6s0acNInG4eeZFHt0SypBDGER/slMp0z/KSYRbaxZWz2XymDyy X-Received: by 10.112.166.200 with SMTP id zi8mr43543lbb.102.1407627479280; Sat, 09 Aug 2014 16:37:59 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id q10sm3732304lal.37.2014.08.09.16.37.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Aug 2014 16:37:57 -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> X-Mailer: git-send-email 1.7.10.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);