From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 5D1FB2BA2; Fri, 21 Apr 2017 17:06:40 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Apr 2017 08:06:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,230,1488873600"; d="scan'208";a="848426736" Received: from silpixa00390851.ir.intel.com ([10.237.223.109]) by FMSMGA003.fm.intel.com with ESMTP; 21 Apr 2017 08:06:37 -0700 From: Roman Korynkevych To: dev@dpdk.org Cc: harry.van.haaren@intel.com, maryam.tahhan@intel.com, Roman Korynkevych , stable@dpdk.org Date: Fri, 21 Apr 2017 16:06:36 +0100 Message-Id: <1492787196-9101-1-git-send-email-romanx.korynkevych@intel.com> X-Mailer: git-send-email 2.1.0 Subject: [dpdk-dev] [PATCH v1 1/1] app/procinfo: buffer null termination fix. 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: Fri, 21 Apr 2017 15:06:41 -0000 Coverity issue: 143252 Fixes: 2deb6b5246d7706448d070335b329d1acb754cee ("app/procinfo: add collectd format and host id") Cc: stable@dpdk.org Signed-off-by: Roman Korynkevych --- 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 16b27b2..97d0352 100644 --- a/app/proc_info/main.c +++ b/app/proc_info/main.c @@ -189,7 +189,7 @@ proc_info_preparse_args(int argc, char **argv) proc_info_usage(prgname); return -1; } - strncpy(host_id, argv[i+1], sizeof(host_id)); + strncpy(host_id, argv[i+1], sizeof(host_id)-1); } } -- 2.1.0