diff options
Diffstat (limited to 'community/liboping/fix-format-string.patch')
-rw-r--r-- | community/liboping/fix-format-string.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/community/liboping/fix-format-string.patch b/community/liboping/fix-format-string.patch new file mode 100644 index 00000000000..4e344176103 --- /dev/null +++ b/community/liboping/fix-format-string.patch @@ -0,0 +1,37 @@ +See: + +* https://github.com/octo/liboping/pull/60 +* https://bugs.debian.org/997189 +* https://salsa.debian.org/debian/liboping/-/blob/debian/debian/patches/fix_HOST_PRINTF_format_string.patch + +diff -upr liboping-1.10.0.orig/src/oping.c liboping-1.10.0/src/oping.c +--- liboping-1.10.0.orig/src/oping.c 2022-02-22 20:17:48.000000000 +0100 ++++ liboping-1.10.0/src/oping.c 2022-02-22 20:22:23.000000000 +0100 +@@ -1125,7 +1125,7 @@ static int update_graph_prettyping (ping + wattron (ctx->window, COLOR_PAIR(color)); + + if (has_utf8()) +- mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, symbol); ++ mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, "%s", symbol); + else + mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, symbolc); + +@@ -1223,7 +1223,7 @@ static int update_graph_histogram (ping_ + mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, ' '); + else if (has_utf8 ()) + mvwprintw (ctx->window, /* y = */ 3, /* x = */ x + 2, +- hist_symbols_utf8[index]); ++ "%s", hist_symbols_utf8[index]); + else + mvwaddch (ctx->window, /* y = */ 3, /* x = */ x + 2, + hist_symbols_acs[index] | A_ALTCHARSET); +@@ -1600,8 +1600,7 @@ static void update_host_hook (pingobj_it + + HOST_PRINTF ("%zu bytes from %s (%s): icmp_seq=%u ttl=%i ", + data_len, context->host, context->addr, +- sequence, recv_ttl, +- format_qos (recv_qos, recv_qos_str, sizeof (recv_qos_str))); ++ sequence, recv_ttl); + if ((recv_qos != 0) || (opt_send_qos != 0)) + { + HOST_PRINTF ("qos=%s ", |