This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch master in repository gfs2-utils.
The following commit(s) were added to refs/heads/master by this push: new 17fb4703 gfs2/edit: always use "%s"-style format for printf()-style functions 17fb4703 is described below
commit 17fb470356a6d55988f05ac70f06b382ef982604 Author: Sergei Trofimovich slyich@gmail.com AuthorDate: Sun Nov 7 09:00:31 2021 +0000
gfs2/edit: always use "%s"-style format for printf()-style functions
`ncurses-6.3` added printf-style function attributes and now makes it easier to catch cases when user input is used in place of format string when built with CFLAGS=-Werror=format-security:
hexedit.c:227:9: error: format not a string literal and no format arguments [-Werror=format-security] 227 | printw(s2); | ^~~~~~
Let's wrap all the missing places with "%s" format. --- gfs2/edit/hexedit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index 798639b5..88ee3e5f 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -221,10 +221,10 @@ static void gfs2instr(const char *s1, const char *s2) { COLORS_HIGHLIGHT; move(line,0); - printw(s1); + printw("%s", s1); COLORS_NORMAL; move(line,17); - printw(s2); + printw("%s", s2); line++; }
cluster-commits@lists.fedorahosted.org