fix #Q159 - segfault with super long item names
From a bug report, putting an object with really long specific and type names into a container with really long specific and type names caused the program to crash. pline() overflowed the buffer it formatted into, and even though it was able to send that for output and trigger a --More-- prompt, eventually a segfault occurred. Give vpline and vraw_printf a much bigger working buffer, then truncate the formatted text to BUFSZ - 1 characters so that we don't just push the long line trouble into the separate interfaces.
This commit is contained in:
@@ -313,6 +313,8 @@ surviving choking while eating various foods (cockatrice egg, fortune cookie,
|
||||
wolfsbane, others) didn't carry through to those foods' side-effects
|
||||
shapechangers who take on mimic or hider form will mimic or hide when feasible
|
||||
avoid War message if tinning a Rider corpse fails
|
||||
prevent long messages from triggering access violation or segmentation fault
|
||||
due to buffer overflow in pline()
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
Reference in New Issue
Block a user