Prevent accessing outside the mons array

Fix another out-of-bounds error
Monster trying to decide if a tin could cure stoning looking at
a special or empty tin would do acidic(&mons[-1])
This commit is contained in:
Pasi Kallinen
2019-12-20 15:16:12 +02:00
committed by nhmall
parent c8fbb3b7b1
commit f4ab235b81
3 changed files with 12 additions and 4 deletions

View File

@@ -7,6 +7,8 @@ produce 3.6.5 as well as any post-release fixes in binaries.
General Fixes and Modified Features
-----------------------------------
have string_for_opt() return empty_optstr on failure
fix accessing mons[-1] when trying to gate in a non-valid demon
fix accessing mons[-1] when monster figures out if a tin cures stoning
ensure existing callers of string_for_opt() check return value before using it
fix potential buffer overflow in add_menu_coloring()
fix potential buffer overflow in sym_val()