From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 0C288AAF3 for ; Wed, 9 May 2018 11:49:30 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id f8-v6so26562536wmc.4 for ; Wed, 09 May 2018 02:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YdwavrEyVWkr5iJ+vfunjELtcR92/G3U6jD1+/Y98BE=; b=J/Cr5KZLD85O3OTA/A5QQsQIQRDR0qo2Ncstk0trSzO9uku5KaLl9cQGavWK5OIdSc CKzUhYXQT+FAjbgVwbliuh/kojzk8YloxzyS5BVfyjpUoihaMwSikZ6//Vc3Eze8UQ4N MgoMzlvvif3TwUoIlsFvHuFv+WYOxIPcwUdbiw5v1TYsOmYuMKxQACmOOrayEHAD6vNy A94SZgj++Nki26JHlCq0RWr9pngv0ZLsPpatXlw8StivA8JeWJPQhAAhzRfLOUJ3pIoS h+3b802miFXmUj0jwJxvAY79z2UHMSltjeg+vPtWRdGIBzg8hn23h0mPpgKnC4Tz/UHk +rwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YdwavrEyVWkr5iJ+vfunjELtcR92/G3U6jD1+/Y98BE=; b=IAPUxV5KJd9TY+yHlymnK03kBWr0++EeWB2rzmGaaESKIAjCXS85gUN4DOgBBbWpHE 5Pj4TsZW9gDEUfvTRclHuUNfG8E8VbtJg1wDwbd58hxwFiBzhPW6nec+2hWECoM27Aob ssaKM3IKje+rn4kHgvDZrWGGD82BBhgIkSfIsplUye2ZFAQgs1skdjtuMz2I4Eol0r5O LmFXpcrtfWbAe40p1d2y9SqVsUZt5urRd15BZ9Koh//dTEa0znqp6cYOByq8F1IkeUdL n3ZodAgEKQkgXvU0lB9lJAkMNh1LR552lY5vspeEna4iQj326LHLaK8QfPEXZgjniEk7 2SZw== X-Gm-Message-State: ALQs6tAu5jCHlXZudwBBKMjCSq3ipISBc9mWz4h0KyvSb5E72Q7D+Y87 p0bwXKDsDFMll9mXTA/0+BuHPx0yzBzg01skG8CdVg== X-Google-Smtp-Source: AB8JxZo98WvvXKWPun1M1uw3EOfbrb/8Xm3pAISea/LuJhwmElqdURRlgnkLBz3wXL0Ry1/gz0BT37h32hHyBacrka4= X-Received: by 2002:a50:f0c7:: with SMTP id a7-v6mr59559671edm.90.1525859369827; Wed, 09 May 2018 02:49:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.212.155 with HTTP; Wed, 9 May 2018 02:49:29 -0700 (PDT) In-Reply-To: <152582947587.6809.10453223101431457646.stgit@localhost.localdomain> References: <152582834896.6809.14521072557832633661.stgit@localhost.localdomain> <152582947587.6809.10453223101431457646.stgit@localhost.localdomain> From: Alejandro Lucero Date: Wed, 9 May 2018 10:49:29 +0100 Message-ID: To: Andy Green Cc: dev Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 05/18] drivers/net/nfp/nfpcore: fix strncpy misuse X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 09:49:30 -0000 On Wed, May 9, 2018 at 2:31 AM, Andy Green wrote: > Signed-off-by: Andy Green > --- > drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c > b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c > index 4e6c66624..52b294888 100644 > --- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c > +++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c > @@ -31,6 +31,8 @@ > #include > #include > > +#include > + > #include "nfp_cpp.h" > #include "nfp_target.h" > #include "nfp6000/nfp6000.h" > @@ -846,7 +848,7 @@ nfp6000_init(struct nfp_cpp *cpp, const char *devname) > > > memset(desc->busdev, 0, BUSDEV_SZ); > - strncpy(desc->busdev, devname, strlen(devname)); > + strlcpy(desc->busdev, devname, sizeof(desc->busdev)); > > ret = nfp_acquire_process_lock(desc); > if (ret) > > Acked-by: Alejandro Lucero Tested-by: Alejandro Lucero