From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id 8CD96DED for ; Mon, 30 Apr 2018 16:07:11 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id o4-v6so8169476wrm.0 for ; Mon, 30 Apr 2018 07:07:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pkpfTFkUNuJNnmuuSRlIz8wEVHCIM8w1UYTwjw6DS2A=; b=TLVSIWe9fyVUbC0HSRoQbEsl/0oWLBEiF0msXmkso6ID9Fzyj+sSKflrCLgmaMCJfb Q7tdchn8iXMiYwd/3SzQRYkjF2YF+yi9PGmqQcT0LAtS6tMtqvHN6Sy7pc71MNHRqAA1 FzZ+6nyyOF1fXp6PWqNorGGBPHzPC+kMtMBZymIqohFPDTpzbCSTU7Em+GgshFVW6PEr GwaWe5KVZblK+ZoGIocU4uLXajBZ7WKokpBMqpa3PVBLZSrXevfGolpxkfY4z2p8NdOW CwwAV7uYXH42Q+7oXUZMmcA4nIX+p0TG0JNhzPgi6h0HjfbwIvLtf2LGxUIPJR7vz+pm oVNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pkpfTFkUNuJNnmuuSRlIz8wEVHCIM8w1UYTwjw6DS2A=; b=VKLSFiVV/cbNrV18aPl+/UCwYIJT9yQQDZzQbK7FTkNRQuCyvEss7erM/5SEhd+3mi YcKyEwJpb/rJK9bsVXNkhV6Bt7wF9q1wtR8qf+FN8ldjG3gfZ7j6l0heoLOIJeISRYGJ m37m/8wzKW8GNMWamHOMq8NFd+592VOcGsCkQLDkLY2U1EQ+lQ2RFknejeKej9Kcou7m AFgH9TY3J3OCgp3l44P2Oxj4aT+rVvCUjCfLQ/RvgGLMUZAcm0GAXBo6pLpJ31XKrYPU yV/yYqFj/aMHAZUUca0emxteA9DkZHU7ds/tlhfXy5HgwTyh5/FQdGdjwfO339fCpt7P 0Fnw== X-Gm-Message-State: ALQs6tCXTHtkOPGlwFed0ra3nR1CWtrlb5Oruf1GnK59CegBtPTM33fk EHUB9DKSK+xYOv0C5rc2PBs= X-Google-Smtp-Source: AB8JxZptwycNEh5INESilSKwuO+ve8Ed2JxHDsqpBhX1x5BVq7ErKyoWkY1D2XmhpOxlYMoV20dYSA== X-Received: by 2002:adf:a617:: with SMTP id k23-v6mr9413960wrc.200.1525097231297; Mon, 30 Apr 2018 07:07:11 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id 60-v6sm6724311wrj.62.2018.04.30.07.07.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:07:10 -0700 (PDT) From: luca.boccassi@gmail.com To: Radu Nicolau Cc: Bruce Richardson , dpdk stable Date: Mon, 30 Apr 2018 15:03:07 +0100 Message-Id: <20180430140606.4615-29-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'app/procinfo: fix strncpy usage in args parsing' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:07:11 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 943b98e5b9b82ee9bfe5ce310925dfa72d0880ed Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Tue, 20 Feb 2018 13:52:22 +0000 Subject: [PATCH] app/procinfo: fix strncpy usage in args parsing [ upstream commit f0b9479497741040476aae5008afe84e0467e586 ] Replace strncpy with snprintf to avoid overwriting the last NULL character. Coverity issue: 143252 Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id") Signed-off-by: Radu Nicolau Acked-by: Bruce Richardson --- app/proc_info/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/proc_info/main.c b/app/proc_info/main.c index 2f53e3caa..f90c14498 100644 --- a/app/proc_info/main.c +++ b/app/proc_info/main.c @@ -159,7 +159,7 @@ proc_info_preparse_args(int argc, char **argv) proc_info_usage(prgname); return -1; } - strncpy(host_id, argv[i+1], sizeof(host_id)); + snprintf(host_id, sizeof(host_id), "%s", argv[i+1]); } } -- 2.14.2