Fix the mandoc_strndup() utility function. All existing callers seem
authorschwarze <schwarze@openbsd.org>
Wed, 7 Feb 2018 20:04:33 +0000 (20:04 +0000)
committerschwarze <schwarze@openbsd.org>
Wed, 7 Feb 2018 20:04:33 +0000 (20:04 +0000)
commit2dfc6a663df73e38907826fd8aac3aad7d581ad4
tree886c2319ef8f2622445e91d62446a27843ff8cc7
parent24deec72c0d56e5d59f3ef04470d51903df85b0a
Fix the mandoc_strndup() utility function.  All existing callers seem
safe so far, but implementing it with an unchecked memcpy(3) is just
wrong and quite dangerous.
usr.bin/mandoc/mandoc_aux.c