diff options
Diffstat (limited to 'meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch')
-rw-r--r-- | meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch b/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch new file mode 100644 index 0000000000..f8eb3ae67a --- /dev/null +++ b/meta-networking/recipes-support/ruli/files/0001-Fix-build-with-format-string-checks.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 40848547abf592c8d29b85ef1346001514944435 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 17 Jun 2017 10:14:20 -0700 | ||
4 | Subject: [PATCH] Fix build with format string checks | ||
5 | |||
6 | Fixes | ||
7 | | ruli_addr.c:418:5: error: format not a string literal and no format arguments [-Werror=format-security] | ||
8 | | return fprintf(out, inet_ntoa(addr->ipv4)); | ||
9 | | ^~~~~~ | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | src/ruli_addr.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/src/ruli_addr.c b/src/ruli_addr.c | ||
19 | index 00d5d0d..f1eabae 100644 | ||
20 | --- a/src/ruli_addr.c | ||
21 | +++ b/src/ruli_addr.c | ||
22 | @@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli_addr *addr, int family) | ||
23 | { | ||
24 | switch (family) { | ||
25 | case PF_INET: | ||
26 | - return fprintf(out, inet_ntoa(addr->ipv4)); | ||
27 | + return fprintf(out, "%s", inet_ntoa(addr->ipv4)); | ||
28 | |||
29 | case PF_INET6: | ||
30 | return ruli_inet6_print(out, &addr->ipv6); | ||
31 | -- | ||
32 | 2.13.1 | ||
33 | |||