summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch')
-rw-r--r--meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch b/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
new file mode 100644
index 000000000..5f96f0f4c
--- /dev/null
+++ b/meta-oe/recipes-devtools/iptraf/iptraf/format_string.patch
@@ -0,0 +1,31 @@
1Index: iptraf-3.0.0/src/othptab.c
2===================================================================
3--- iptraf-3.0.0.orig/src/othptab.c
4+++ iptraf-3.0.0/src/othptab.c
5@@ -335,7 +335,7 @@ void printothpentry(struct othptable *ta
6 break;
7 }
8
9- sprintf(scratchpad, inet_ntoa(saddr));
10+ sprintf(scratchpad, "%s", inet_ntoa(saddr));
11 strcat(msgstring, scratchpad);
12 wattrset(table->othpwin, ARPATTR);
13 break;
14@@ -354,7 +354,7 @@ void printothpentry(struct othptable *ta
15 break;
16 }
17
18- sprintf(scratchpad, rarp_mac_addr);
19+ sprintf(scratchpad, "%s", rarp_mac_addr);
20 strcat(msgstring, scratchpad);
21 wattrset(table->othpwin, ARPATTR);
22 break;
23@@ -421,7 +421,7 @@ void printothpentry(struct othptable *ta
24 wattrset(table->othpwin, UNKNIPATTR);
25 protptr = getprotobynumber(entry->protocol);
26 if (protptr != NULL) {
27- sprintf(protname, protptr->p_aliases[0]);
28+ sprintf(protname, "%s", protptr->p_aliases[0]);
29 } else {
30 sprintf(protname, "IP protocol");
31 unknown = 1;