-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.10.0: build fails with -Werror=format-security
#72
Comments
I think it's fixed in a Debian patch which basically uses |
Yep looks like below patch from Debian should fix the issue Index: liboping/src/oping.c
===================================================================
--- liboping.orig/src/oping.c
+++ liboping/src/oping.c
@@ -1156,7 +1156,7 @@ static int update_graph_prettyping (ping
wattron (ctx->window, COLOR_PAIR(color));
if (has_utf8())
- mvwprintw (ctx->window, /* y = */ y_max, /* x = */ x + 2, symbol);
+ mvwprintw (ctx->window, /* y = */ y_max, /* x = */ x + 2, "%s", symbol);
else
mvwaddch (ctx->window, /* y = */ y_max, /* x = */ x + 2, symbolc);
@@ -1262,7 +1262,7 @@ static int update_graph_histogram (ping_
mvwaddch (ctx->window, /* y = */ y_max, /* x = */ x + 2, ' ');
else if (has_utf8 ())
mvwprintw (ctx->window, /* y = */ y_max, /* x = */ x + 2,
- hist_symbols_utf8[index]);
+ "%s", hist_symbols_utf8[index]);
else
mvwaddch (ctx->window, /* y = */ y_max, /* x = */ x + 2,
hist_symbols_acs[index] | A_ALTCHARSET);
@@ -1639,8 +1639,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 ",
|
|
The patch fixes the build on macOS too. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: