startup: use a format string, to deflect format-string attacks

This fixes the second part of https://savannah.gnu.org/bugs/?63964.

Reported-by: Vince Vince
This commit is contained in:
Benno Schulenberg 2023-03-27 12:02:19 +02:00
parent b8ead3b511
commit fdcafb83e3

View File

@ -2565,7 +2565,7 @@ int main(int argc, char **argv)
#ifdef ENABLE_NANORC
if (startup_problem != NULL)
statusline(ALERT, startup_problem);
statusline(ALERT, "%s", startup_problem);
#define NOTREBOUND first_sc_for(MMAIN, do_help) && \
first_sc_for(MMAIN, do_help)->keycode == 0x07