fix hunger status highlighting text match

Crash triggered by fuzzer.

The Null value for not-hungry between "Satiated" and "Hungry" in the
array of possible hunger states caused a crash if C++ regex handling
was being used.  With posixregex, it would pass benignly for tty but
crash for curses.  I didn't check any other interface.
This commit is contained in:
PatR
2024-09-30 12:41:29 -07:00
parent 7b34edc11a
commit 4e2494c859
3 changed files with 12 additions and 0 deletions

View File

@@ -1467,6 +1467,10 @@ when a secret corridor was discovered by wand of secret door detection or by
forgotten unless within range of a light source
when poly'd into a giant, kicking a closed door always succeeds in breaking it
reduce crystal plate mail weight
interactively setting a status highlight for hunger with 'O' and choosing
'text match' could crash while setting up the menu of hunger status
value strings; happened for curses or if the program was built to
use C++ regex processing but not for tty+posixregex
Fixes to 3.7.0-x General Problems Exposed Via git Repository