summaryrefslogtreecommitdiff
path: root/net-vpn/strongswan/files/strongswan-5.9.6-werror-security.patch
blob: 27e541439230afe73165faa6af997c83650aae9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
 	}