1From 40848547abf592c8d29b85ef1346001514944435 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 Jun 2017 10:14:20 -0700
4Subject: [PATCH] Fix build with format string checks
5
6Fixes
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
11Upstream-Status: Pending
12
13Signed-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--- a/src/ruli_addr.c
19+++ b/src/ruli_addr.c
20@@ -415,7 +415,7 @@ int ruli_in_print(FILE *out, const _ruli
21 {
22   switch (family) {
23   case PF_INET:
24-    return fprintf(out, inet_ntoa(addr->ipv4));
25+    return fprintf(out, "%s", inet_ntoa(addr->ipv4));
26
27   case PF_INET6:
28     return ruli_inet6_print(out, &addr->ipv6);
29--- a/sample/getaddrinfo.c
30+++ b/sample/getaddrinfo.c
31@@ -174,7 +174,7 @@ static void solve(const char *fullname)
32
33       for (ai = ai_res; ai; ai = ai->ai_next) {
34
35-	printf(fullname);
36+	printf("%s", fullname);
37
38 	switch (ai->ai_family) {
39 	case PF_INET:
40--- a/sample/ruli-getaddrinfo.c
41+++ b/sample/ruli-getaddrinfo.c
42@@ -176,7 +176,7 @@ static void solve(const char *fullname)
43
44       for (ai = ai_res; ai; ai = ai->ai_next) {
45
46-	printf(fullname);
47+	printf("%s", fullname);
48
49 	switch (ai->ai_family) {
50 	case PF_INET:
51