]> granicus.if.org Git - nethack/commit
alphabet sour warning
authorPatR <rankin@nethack.org>
Sun, 30 Dec 2018 04:39:11 +0000 (20:39 -0800)
committerPatR <rankin@nethack.org>
Sun, 30 Dec 2018 04:39:11 +0000 (20:39 -0800)
commit39b6f7f4628a073f0ea0cc34c12581fab7051a0a
tree56e10546d6595f8ed2d5a1d00b92cfb4ff997069
parentd418008b31109b70c812dcd5a810d5bd646fd656
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.
doc/fixes36.2
src/pager.c