kristaps@ found this with valgrind, merge his patch from bsd.lv:
authorschwarze <schwarze@openbsd.org>
Mon, 18 Aug 2014 13:25:54 +0000 (13:25 +0000)
committerschwarze <schwarze@openbsd.org>
Mon, 18 Aug 2014 13:25:54 +0000 (13:25 +0000)
commit6c6f9e9518a597d47cce7abd0696f439a333f24a
tree7fdfde9bceb973117fd5ac85950be170f3404d60
parent5f2be52b3617ad4fcf2fb6724e18253eae10e54d
kristaps@ found this with valgrind, merge his patch from bsd.lv:
Fix a corner case where \H<nil> (where <nil> is the \0 character) would
cause mandoc_escape() to read past the end of an allocated string.
Found when a script scanning of all Mac OSX manuals accidentally also
scanned binary (gzip'd) files, discussed with schwarze@ on tech@mdocml.
usr.bin/mandoc/mandoc.c