From: Pasi Kallinen Date: Tue, 4 Jan 2022 20:28:00 +0000 (+0200) Subject: Fix X11 tombstone string overflow X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84af696627d7ac8c4e32ae2e9823cec7f9730c7a;p=nethack Fix X11 tombstone string overflow --- diff --git a/win/X11/wintext.c b/win/X11/wintext.c index c3ce45f29..ee96a3234 100644 --- a/win/X11/wintext.c +++ b/win/X11/wintext.c @@ -464,7 +464,7 @@ calculate_rip_text(int how, time_t when) long cash; /* Put name on stone */ - Sprintf(rip_line[NAME_LINE], "%s", g.plname); + Sprintf(rip_line[NAME_LINE], "%.16s", g.plname); /* STONE_LINE_LEN */ /* Put $ on stone */ cash = max(g.done_money, 0L);