summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-19 02:19:00 +0000
committerSam James <sam@gentoo.org>2022-05-19 02:19:00 +0000
commit1ba8e170537551e7d13f2f7920bf33f8cc766184 (patch)
tree5999c6cb97ed6a4268d976cc0dad433195921745 /net-vpn/strongswan
parentmedia-video/ffdiaporama: fix parallel build (diff)
downloadgentoo-1ba8e170537551e7d13f2f7920bf33f8cc766184.tar.gz
gentoo-1ba8e170537551e7d13f2f7920bf33f8cc766184.tar.bz2
gentoo-1ba8e170537551e7d13f2f7920bf33f8cc766184.zip
net-vpn/strongswan: add false-positive wformat-security patch from upstream
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-vpn/strongswan')
-rw-r--r--net-vpn/strongswan/files/strongswan-5.9.6-werror-security.patch20
-rw-r--r--net-vpn/strongswan/strongswan-5.9.6.ebuild4
2 files changed, 24 insertions, 0 deletions
diff --git a/net-vpn/strongswan/files/strongswan-5.9.6-werror-security.patch b/net-vpn/strongswan/files/strongswan-5.9.6-werror-security.patch
new file mode 100644
index 000000000000..27e541439230
--- /dev/null
+++ b/net-vpn/strongswan/files/strongswan-5.9.6-werror-security.patch
@@ -0,0 +1,20 @@
+https://github.com/strongswan/strongswan/commit/d23c0ea81e630af3cfda89aeeb52146c0c84c960
+https://github.com/strongswan/strongswan/issues/1025
+
+From: Tobias Brunner <tobias@strongswan.org>
+Date: Mon, 2 May 2022 09:31:49 +0200
+Subject: [PATCH] enum: Fix compiler warning
+
+Closes strongswan/strongswan#1025
+--- a/src/libstrongswan/utils/enum.c
++++ b/src/libstrongswan/utils/enum.c
+@@ -97,7 +97,7 @@ char *enum_flags_to_string(enum_name_t *e, u_int val, char *buf, size_t len)
+ return buf;
+ }
+
+- if (snprintf(buf, len, e->names[0]) >= len)
++ if (snprintf(buf, len, "%s", e->names[0]) >= len)
+ {
+ return NULL;
+ }
+
diff --git a/net-vpn/strongswan/strongswan-5.9.6.ebuild b/net-vpn/strongswan/strongswan-5.9.6.ebuild
index 156d0149f594..9de7b103de17 100644
--- a/net-vpn/strongswan/strongswan-5.9.6.ebuild
+++ b/net-vpn/strongswan/strongswan-5.9.6.ebuild
@@ -55,6 +55,10 @@ RDEPEND="${COMMON_DEPEND}
UGID="ipsec"
+PATCHES=(
+ "${FILESDIR}"/${P}-werror-security.patch
+)
+
pkg_setup() {
linux-info_pkg_setup