[Bug 266882] mandoc(1) crashes with a core dump if it cannot parse a manual page

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 07 Oct 2022 07:51:34 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266882

            Bug ID: 266882
           Summary: mandoc(1) crashes with a core dump if it cannot parse
                    a manual page
           Product: Base System
           Version: 13.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: wosch@FreeBSD.org

mandoc(1) crashes with a core dump if it cannot parse a manual page.

How to repeat:

# FreeBSD  14.0-CURRENT
curl -sSf
https://people.freebsd.org/~wosch/tmp/mandoc/core-dumped/krb5_openlog.3 |
mandoc >/dev/null
Assertion failed: (*sz == 2 && (*start)[0] == '.' && (*start)[1] == 'T'),
function mandoc_escape, file /usr/src/contrib/mandoc/mandoc.c, line 467.
Abort trap (core dumped)


# FreeBSD 13.1-STABLE
curl -sSf
https://people.freebsd.org/~wosch/tmp/mandoc/core-dumped/krb5_openlog.3 |
mandoc >/dev/null
Abort trap (core dumped)

-- 
You are receiving this mail because:
You are the assignee for the bug.