projects/aports·blob master · refs

37 lines · 1.5 KiB

1See:
2
3* https://github.com/octo/liboping/pull/60
4* https://bugs.debian.org/997189
5* https://salsa.debian.org/debian/liboping/-/blob/debian/debian/patches/fix_HOST_PRINTF_format_string.patch
6
7diff -upr liboping-1.10.0.orig/src/oping.c liboping-1.10.0/src/oping.c
8--- liboping-1.10.0.orig/src/oping.c 2022-02-22 20:17:48.000000000 +0100
9+++ liboping-1.10.0/src/oping.c 2022-02-22 20:22:23.000000000 +0100
10@@ -1125,7 +1125,7 @@ static int update_graph_prettyping (ping
11 wattron (ctx->window, COLOR_PAIR(color));
12
13 if (has_utf8())
14- mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, symbol);
15+ mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, "%s", symbol);
16 else
17 mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, symbolc);
18
19@@ -1223,7 +1223,7 @@ static int update_graph_histogram (ping_
20 mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, ' ');
21 else if (has_utf8 ())
22 mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2,
23- hist_symbols_utf8[index]);
24+ "%s", hist_symbols_utf8[index]);
25 else
26 mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2,
27 hist_symbols_acs[index] | A_ALTCHARSET);
28@@ -1600,8 +1600,7 @@ static void update_host_hook (pingobj_it
29
30 HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ",
31 data_len, context->host, context->addr,
32- sequence, recv_ttl,
33- format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str)));
34+ sequence, recv_ttl);
35 if ((recv_qos != 0) || (opt_send_qos != 0))
36 {
37 HOST_PRINTF ("qos=%s ",