1From d3fb471f53712e710fb5777b1b0851c46b7be64c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 25 Jun 2017 01:23:03 -0700
4Subject: [PATCH] src/ruli_addr.c: Add missing format string
5
6fixes
7
8| ruli_addr.c: In function 'ruli_in_snprint':
9| ruli_addr.c:491:5: error: format not a string literal and no format arguments [-Werror=format-security]
10|      return snprintf(buf, size, inet_ntoa(addr->ipv4));
11|      ^~~~~~
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15Upstream-Status: Pending
16
17 src/ruli_addr.c | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/src/ruli_addr.c b/src/ruli_addr.c
21index f1eabae..5f1fd4f 100644
22--- a/src/ruli_addr.c
23+++ b/src/ruli_addr.c
24@@ -488,7 +488,7 @@ int ruli_in_snprint(char *buf, size_t size, const _ruli_addr *addr, int family)
25 {
26   switch (family) {
27   case PF_INET:
28-    return snprintf(buf, size, inet_ntoa(addr->ipv4));
29+    return snprintf(buf, size, "%s", inet_ntoa(addr->ipv4));
30
31   case PF_INET6:
32     return ruli_inet6_snprint(buf, size, &addr->ipv6);
33--
342.13.1
35
36