From: Karel Zak Date: Thu, 21 Mar 2024 11:16:20 +0100 Subject: wall: fix escape sequence Injection [CVE-2024-28085] Let's use for all cases the same output function. Reported-by: Skyler Ferrante Signed-off-by: Karel Zak --- term-utils/wall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/term-utils/wall.c b/term-utils/wall.c index 16dfb1f..a497d91 100644 --- a/term-utils/wall.c +++ b/term-utils/wall.c @@ -329,7 +329,7 @@ static char *makemsg(char *fname, char **mvec, int mvecsz, int i; for (i = 0; i < mvecsz; i++) { - fputs(mvec[i], fs); + fputs_careful(mvec[i], fs, '^', true, TERM_WIDTH); if (i < mvecsz - 1) fputc(' ', fs); }