liboping
liboping copied to clipboard
Fix HOST_PRINTF format string
Without this patch the printf invocation takes more argument that it has format strings, since the format_qos() output string is printed in the if statement following the HOST_PRINTF invocation, I believe this to be an accidental error made in 66464b61f8ee756dcfc0081944f4367da2b1a6ab (this commit removes the format from the format string but doesn't remove the argument).
This also affects liboping in Debian, but there are actually more such issues than this pull request fixes. The remaining issues are:
oping.c: In function ‘update_graph_prettyping’:
oping.c:1159:25: error: format not a string literal and no format arguments [-Werror=format-security]
1159 | mvwprintw (ctx->window, /* y = */ y_max, /* x = */ x + 2, symbol);
| ^~~~~~~~~
oping.c: In function ‘update_graph_histogram’:
oping.c:1265:41: error: format not a string literal and no format arguments [-Werror=format-security]
1265 | hist_symbols_utf8[index]);
| ^~~~~~~~~~~~~~~~~
libtool: compile: gcc -DHAVE_CONFIG_H -I. -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Werror -g -O2 -ffile-prefix-map=/home/abe/debian/NMU/liboping=. -fstack-protector-strong -Wformat -Werror=format-security -c liboping.c -o liboping_la-liboping.o >/dev/null 2>&1
cc1: all warnings being treated as errors
https://salsa.debian.org/debian/liboping/-/blob/debian/debian/patches/fix_HOST_PRINTF_format_string.patch should fix all issues, you might want to use that instead of the PR.