Mercurial > hg
changeset 2363:64f1899ff168
Fix format-security warnings
This patch should fix the FTBFS report in Debian sid (bug 997162): the format
string was omitted when displaying the message prefix and the mcabber version.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 24 Oct 2021 21:20:36 +0200 |
parents | 64de2d6858b0 |
children | ca442ece1f70 |
files | mcabber/mcabber/screen.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/mcabber/screen.c Sun Oct 24 18:22:01 2021 +0200 +++ b/mcabber/mcabber/screen.c Sun Oct 24 21:20:36 2021 +0200 @@ -1278,12 +1278,12 @@ tmp = pref[timelen]; pref[timelen] = '\0'; wbkgdset(win_entry->win, get_color(COLOR_TIMESTAMP)); - wprintw(win_entry->win, pref); + wprintw(win_entry->win, "%s", pref); pref[timelen] = tmp; wbkgdset(win_entry->win, get_color(color)); - wprintw(win_entry->win, pref+timelen); + wprintw(win_entry->win, "%s", pref+timelen); } else - wprintw(win_entry->win, pref); + wprintw(win_entry->win, "%s", pref); // Make sure we are at the right position wmove(win_entry->win, winy, prefixwidth-1); @@ -1362,7 +1362,7 @@ wmove(win_entry->win, winy, 0); wbkgdset(win_entry->win, get_color(COLOR_READMARK)); g_snprintf(pref, prefixwidth, " == "); - wprintw(win_entry->win, pref); + wprintw(win_entry->win, "%s", pref); w = scr_gettextwidth() / 3; for (i=0; i<w; i++) wprintw(win_entry->win, "== "); @@ -1782,7 +1782,7 @@ ver = mcabber_version(); message = g_strdup_printf("MCabber version %s.\n", ver); - mvwprintw(chatWnd, 0, 0, message); + mvwprintw(chatWnd, 0, 0, "%s", message); mvwprintw(chatWnd, 1, 0, "http://mcabber.com/"); g_free(ver); g_free(message);