]> git.cameronkatri.com Git - mandoc.git/commit
Fix mandoc_normdate() and the way it is used.
authorIngo Schwarze <schwarze@openbsd.org>
Thu, 27 Jun 2019 15:07:30 +0000 (15:07 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Thu, 27 Jun 2019 15:07:30 +0000 (15:07 +0000)
commitf59a251232e343851a0737c21d9a75ffca28adea
treeda31a7c00b735bc2d319c8a9b75962f46cf1a55f
parentb6723d5f5a8ba2f1931221d8b92823fd4654722f
Fix mandoc_normdate() and the way it is used.
In the past, it could return NULL but the calling code wasn't prepared
to handle that.  Make sure it always returns an allocated string.
While here, simplify the code by handling the "quick" attribute
inside mandoc_normdate() rather than at multiple callsites.

Triggered by deraadt@ pointing out
that snprintf(3) error handling was incomplete in time2a().
man_validate.c
mandoc.c
mdoc_validate.c