CVSROOT:        /cvs
Module name:    src
Changes by:     schwa...@cvs.openbsd.org        2010/11/27 13:52:34

Modified files:
        usr.bin/mandoc : roff.c 

Log message:
Two related bugfixes:

1) When using a user-defined string of length 0 as a macro,
do not access memory before the start of the string (segfault).

2) When beginning to define a user-defined macro, initialize
the string representing the macro to the empty string,
not to the NULL pointer, such that, in case the macro turns
out to not have any content, like in
.de IX
.
the macro will be defined and empty instead of undefined.

This avoids large numbers of bogus mandoc ERROR messages about
undefined macros (which are actually defined and empty), in
particular in man(7) code generated from pod2man(1), for example
in Perl and OpenSSL.

Reply via email to