Menu

#7 Fix build failure on ncurses-6.3

v1.0 (example)
open
nobody
None
5
2021-11-23
2021-11-23
No

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:

creadline.c:71:3: error: format not a string literal and no format arguments [-Werror=format-security]
   71 |   mvwprintw(w, y, x, prompt);
      |   ^~~~~~~~~

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

Attached example fix.

1 Attachments

Discussion


Log in to post a comment.