diff mbox series

[oe,meta-networking,05/17] ipsec-tools: Fix build with gcc7

Message ID 20170424052058.4952-5-raj.khem@gmail.com
State New
Headers show
Series [oe,meta-multimedia,01/17] musicbrainz: Upgrade to 5.1.0 | expand

Commit Message

Khem Raj April 24, 2017, 5:20 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...parse-clear-memory-equal-to-size-of-array.patch | 30 ++++++++++++++++++++++
 .../ipsec-tools/ipsec-tools_0.8.2.bb               |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch

-- 
2.12.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch
new file mode 100644
index 000000000..e9dd84aaa
--- /dev/null
+++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools/0002-cfparse-clear-memory-equal-to-size-of-array.patch
@@ -0,0 +1,30 @@ 
+From a5c59f6a1479947d33dba5191724cc5fc88a614b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Apr 2017 10:39:57 -0700
+Subject: [PATCH 2/2] cfparse: clear memory equal to size of array
+
+Fixes compiler error
+cfparse.y: In function 'set_isakmp_proposal':
+cfparse.y:2567:3: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/racoon/cfparse.y | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/racoon/cfparse.y b/src/racoon/cfparse.y
+index 0d9bd67..5d9c67b 100644
+--- a/src/racoon/cfparse.y
++++ b/src/racoon/cfparse.y
+@@ -2564,7 +2564,7 @@ set_isakmp_proposal(rmconf)
+ 		plog(LLV_DEBUG2, LOCATION, NULL,
+ 			"encklen=%d\n", s->encklen);
+ 
+-		memset(types, 0, ARRAYLEN(types));
++		memset(types, 0, sizeof(types));
+ 		types[algclass_isakmp_enc] = s->algclass[algclass_isakmp_enc];
+ 		types[algclass_isakmp_hash] = s->algclass[algclass_isakmp_hash];
+ 		types[algclass_isakmp_dh] = s->algclass[algclass_isakmp_dh];
+-- 
+2.12.2
+
diff --git a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
index 8f98b6c5c..d7e8b2596 100644
--- a/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
+++ b/meta-networking/recipes-support/ipsec-tools/ipsec-tools_0.8.2.bb
@@ -23,6 +23,7 @@  SRC_URI = "http://ftp.netbsd.org/pub/NetBSD/misc/ipsec-tools/0.8/ipsec-tools-${P
            file://fix-CVE-2015-4047.patch \
            file://0001-Fix-build-with-clang.patch \
            file://0001-Fix-header-issues-found-with-musl-libc.patch \
+           file://0002-cfparse-clear-memory-equal-to-size-of-array.patch \
            "
 SRC_URI[md5sum] = "d53ec14a0a3ece64e09e5e34b3350b41"
 SRC_URI[sha256sum] = "8eb6b38716e2f3a8a72f1f549c9444c2bc28d52c9536792690564c74fe722f2d"