alphabet sour warning

A recently added impossible to check for an(Null) and an("") was
triggered by the fuzzer:  Alphabet soup: 'an("")'.  I reproduced it a
couple of times and tracked it do_screen_description(for '/' command)
matching the symbol from mapglyph to monster class #0, a placeholder
with symbol value '\0'.  So mapglyph() returned a symbol of '\0', but
not necessary from showsyms[0 + SYM_OFF_M].

The pager lookup code's monster loop shouldn't have been attempting
to match against class #0, and since this fix I haven't been able to
reproduce the situation again.  But I also didn't trigger it with a
bunch of temporary checks in mapglyph() so don't know what is really
going on under the hood.
This commit is contained in:
PatR
2018-12-29 20:39:11 -08:00
parent d418008b31
commit 39b6f7f462
2 changed files with 9 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.217 $ $NHDT-Date: 1546129154 2018/12/30 00:19:14 $
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.218 $ $NHDT-Date: 1546144745 2018/12/30 04:39:05 $
This fixes36.2 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.1 in April 2018. Please note, however,
@@ -357,6 +357,10 @@ when built with STATUS_HILITES enabled (the default), gold on status line
was missing '$' prefix for symset:Blank
wizard mode ^G, creating a monster of class 'I' yielded impossible "mkclass
found no class 35 monsters"
in some unknown circumstance, examining something on the map could match bogus
monster class #0 and trigger impossible "Alphabet soup: 'an("")'."
(fix avoids the warning but underlying cause is a mystery; noticed
with the fuzzer, which swaps symbol sets in and out at random)
tty: turn off an optimization that is the suspected cause of Windows reported
partial status lines following level changes
tty: ensure that current status fields are always copied to prior status