From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 323352934 for ; Thu, 3 Nov 2016 13:12:46 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 03 Nov 2016 05:12:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,438,1473145200"; d="scan'208";a="781911595" Received: from sie-lab-212-071.ir.intel.com (HELO silpixa00381633.ir.intel.com) ([10.237.212.71]) by FMSMGA003.fm.intel.com with ESMTP; 03 Nov 2016 05:12:45 -0700 From: Fan Zhang To: dev@dpdk.org Date: Thu, 3 Nov 2016 12:12:41 +0000 Message-Id: <1478175163-229116-2-git-send-email-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1478175163-229116-1-git-send-email-roy.fan.zhang@intel.com> References: <1478175163-229116-1-git-send-email-roy.fan.zhang@intel.com> Subject: [dpdk-dev] [PATCH] examples/ipsec-secgw: fix buffer not terminated issue 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: Thu, 03 Nov 2016 12:12:47 -0000 Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file") Coverity issue: 137855 Signed-off-by: Fan Zhang --- examples/ipsec-secgw/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/parser.c b/examples/ipsec-secgw/parser.c index 99bdfc5..ede08d8 100644 --- a/examples/ipsec-secgw/parser.c +++ b/examples/ipsec-secgw/parser.c @@ -277,7 +277,7 @@ parse_ipv6_addr(const char *token, struct in6_addr *ipv6, uint32_t *mask) if (mask) *mask = atoi(pch); } else { - strncpy(ip_str, token, sizeof(ip_str)); + strncpy(ip_str, token, sizeof(ip_str) - 1); if (mask) *mask = 0; } -- 2.5.5