From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergio Gonzalez Monroy Subject: [PATCH v3 2/9] examples/ipsec-secgw: fix stack smashing error Date: Thu, 9 Jun 2016 09:42:43 +0100 Message-ID: <1465461770-42233-3-git-send-email-sergio.gonzalez.monroy@intel.com> References: <1463575330-8467-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1465461770-42233-1-git-send-email-sergio.gonzalez.monroy@intel.com> Cc: pablo.de.lara.guarch@intel.com, john.mcnamara@intel.com To: dev@dpdk.org Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 9CDE9B432 for ; Thu, 9 Jun 2016 10:42:58 +0200 (CEST) In-Reply-To: <1465461770-42233-1-git-send-email-sergio.gonzalez.monroy@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Building the application with -O3 and -fstack-protection (default in Ubuntu) results in the following error: *** stack smashing detected ***: ./build/ipsec-secgw terminated The error is caused by storing an 8B value in a 4B variable. Fixes: d299106e8e31 ("examples/ipsec-secgw: add IPsec sample application") Signed-off-by: Sergio Gonzalez Monroy --- examples/ipsec-secgw/ipsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ipsec-secgw/ipsec.c b/examples/ipsec-secgw/ipsec.c index 4566d38..3ffa77a 100644 --- a/examples/ipsec-secgw/ipsec.c +++ b/examples/ipsec-secgw/ipsec.c @@ -46,7 +46,7 @@ static inline int create_session(struct ipsec_ctx *ipsec_ctx __rte_unused, struct ipsec_sa *sa) { - uint32_t cdev_id_qp = 0; + unsigned long cdev_id_qp = 0; int32_t ret; struct cdev_key key = { 0 }; -- 2.5.5