aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
blob: 5f96f0f4c4a65c5d3a429e54e5d49984c3b81ff5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Index: iptraf-3.0.0/src/othptab.c
===================================================================
--- iptraf-3.0.0.orig/src/othptab.c
+++ iptraf-3.0.0/src/othptab.c
@@ -335,7 +335,7 @@ void printothpentry(struct othptable *ta
                 break;
             }
 
-            sprintf(scratchpad, inet_ntoa(saddr));
+            sprintf(scratchpad, "%s", inet_ntoa(saddr));
             strcat(msgstring, scratchpad);
             wattrset(table->othpwin, ARPATTR);
             break;
@@ -354,7 +354,7 @@ void printothpentry(struct othptable *ta
                 break;
             }
 
-            sprintf(scratchpad, rarp_mac_addr);
+            sprintf(scratchpad, "%s", rarp_mac_addr);
             strcat(msgstring, scratchpad);
             wattrset(table->othpwin, ARPATTR);
             break;
@@ -421,7 +421,7 @@ void printothpentry(struct othptable *ta
         wattrset(table->othpwin, UNKNIPATTR);
         protptr = getprotobynumber(entry->protocol);
         if (protptr != NULL) {
-            sprintf(protname, protptr->p_aliases[0]);
+            sprintf(protname, "%s", protptr->p_aliases[0]);
         } else {
             sprintf(protname, "IP protocol");
             unknown = 1;