]> granicus.if.org Git - nethack/commit
fix #Q159 - segfault with super long item names
authornethack.rankin <nethack.rankin>
Sat, 10 Feb 2007 04:05:47 +0000 (04:05 +0000)
committernethack.rankin <nethack.rankin>
Sat, 10 Feb 2007 04:05:47 +0000 (04:05 +0000)
commit4168718d5d17aba0dea7c816b13c881b656c6260
treeb07844954eb49011899d9d061fb4ebb0e82c2614
parenta83e2ba4a40feac383ed9d007b0ee778b98cb3b2
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.
doc/fixes34.4
src/pline.c