From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 3B0E18E60 for ; Fri, 11 Dec 2015 18:19:19 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 11 Dec 2015 09:19:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,414,1444719600"; d="scan'208";a="616521696" Received: from sie-lab-212-033.ir.intel.com (HELO silpixa00383881.ir.intel.com) ([10.237.212.33]) by FMSMGA003.fm.intel.com with ESMTP; 11 Dec 2015 09:19:17 -0800 From: Fan Zhang To: dev@dpdk.org Date: Fri, 11 Dec 2015 17:19:16 +0000 Message-Id: <1449854356-7261-1-git-send-email-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.5.0 Subject: [dpdk-dev] [PATCH v2] example/ip_pipeline: fix copy into fixed size buffer defect X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 17:19:19 -0000 Coverity issue: 107133 Fixes: eb32fe7c5574 ("examples/ip_pipeline: rework initialization parameters") Signed-off-by: Fan Zhang Acked-by: Cristian Dumitrescu --- *v2 fixed bug: fix possible buff not null terminated bug examples/ip_pipeline/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c index bc6d6d9..186ca03 100644 --- a/examples/ip_pipeline/init.c +++ b/examples/ip_pipeline/init.c @@ -1068,7 +1068,7 @@ static void app_pipeline_params_get(struct app_params *app, uint32_t i; uint32_t mempool_id; - strcpy(p_out->name, p_in->name); + snprintf(p_out->name, PIPELINE_NAME_SIZE, "%s", p_in->name); p_out->socket_id = (int) p_in->socket_id; -- 2.5.0