From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id DBB5C2583 for ; Sun, 22 Apr 2018 17:10:25 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 131E720FED; Sun, 22 Apr 2018 11:10:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 22 Apr 2018 11:10:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=E5MMp/hAWCG+Mqtds X/BHKgAlZMOS8Krce45t4QtRag=; b=IUDG/mtHn8Qvy06E9kvuoqJYyO1FDwOAt 4m5AN6DDlszFYxjCPw442iponqKqXHGKVAMy5PEoZmssXW4+J2gzJk25z2we6bTs Ry8f7tnyhlhJz7+4Sok2f4Gy/9FPzmHhNIHDLDYXL0u5BltEl5nPrQJVGPjB6Oaa GGZVO/HtDbOQaQn38XuLN/OAa8nQaFylIx4h33xVvfYJySWUJKm77jcKh3BYnbef jowGleUyU9/zAeBCFtbmVmEwgZoK+I37nUK4fnXS+hKT7DuQtfgEWIi6oYimOM9h sjYAU+xTLYpW7qJ9CKLyGgAOM379Zf8tKHNPNMOxUXAW2NU+c9q7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=E5MMp/hAWCG+MqtdsX/BHKgAlZMOS8Krce45t4QtRag=; b=mfQT8a/t RoX8v+ARrT5dh5lU+KBeJw9Iu+AM6pHm8YE4Hmh/LAD8ANmirEv8DgBUJhchyLru +6DvvLsxCOGRichUA5YcRTkWCSjS71ro/f5UODNy14SthEqed8AfJvXtNRmTGl8k epNTCRl5+SxXAOh2rUMHU6Bcoq+tOqF57xMgIkJeFSVi5o9na4ilQ8kNwl+IXsZt 3k33h7J6ttkTBgdzE611IAGHvKA14vSJujQxapUWZArc9frl324V2TwbZbx57z+b mRM+OGNQezNh89BRRaNtYHUOdYbTkrPArvGE2oaeGagtzb0yGVhbxCPjFEQzWes7 Y3ElB8oCX5dZxA== X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.66]) by mail.messagingengine.com (Postfix) with ESMTPA id 289301025A; Sun, 22 Apr 2018 11:10:22 -0400 (EDT) From: Yuanhan Liu To: Radu Nicolau Cc: Bruce Richardson , dpdk stable Date: Sun, 22 Apr 2018 23:08:55 +0800 Message-Id: <20180422150949.17523-5-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180422150949.17523-1-yliu@fridaylinux.org> References: <20180422150949.17523-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'app/procinfo: fix strncpy usage in args parsing' has been queued to LTS release 17.11.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: Sun, 22 Apr 2018 15:10:26 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.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 04/29/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 5919756e4d383f36ac491ba3cb65f7db394b9df6 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 64fbbd0f8..875d91ea3 100644 --- a/app/proc_info/main.c +++ b/app/proc_info/main.c @@ -188,7 +188,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.11.0