Menu

#5 Update for ncurses-6.3

Unstable (example)
open
nobody
None
5
2021-11-14
2021-11-14
No

jcursesdisplay.c: always use "%s"-style format for printf()-style functions

ncuses-6.3 added printf-style function attributes and now makes
it easier to catch cases when user input is used in palce of format
string when built with CFLAGS=-Werror=format-security:

jcursesdisplay.c:111:17: error: format not a string literal and no format arguments [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-security-Werror=format-security8;;]
  111 |                 mvprintw(2, 0, statusMessage);
      |                 ^~~~~~~~

Let's wrap all the missing places with "%s" format.

1 Attachments

Discussion


Log in to post a comment.