]> granicus.if.org Git - nethack/commitdiff
Fix X11 tombstone string overflow
authorPasi Kallinen <paxed@alt.org>
Tue, 4 Jan 2022 20:28:00 +0000 (22:28 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 4 Jan 2022 20:28:16 +0000 (22:28 +0200)
win/X11/wintext.c

index c3ce45f29482e831ca44d4d1d3b205b53df154bf..ee96a32340d934f8aa004b9d05f98205bfabef80 100644 (file)
@@ -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);