From c0667bb0674363961e21650dd6fa239e4696d039 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 28 Apr 2022 16:21:09 +0000 Subject: The syntax of the roff(7) .mc request is quite special and the roff_onearg() parsing function is too generic, so provide a dedicated parsing function instead. This fixes an assertion failure when an \o escape sequence is passed as the argument; the bug was found by tb@ using afl(1). It also makes mandoc output more similar to groff in various cases. --- regress/roff/mc/args.out_lint | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 regress/roff/mc/args.out_lint (limited to 'regress/roff/mc/args.out_lint') diff --git a/regress/roff/mc/args.out_lint b/regress/roff/mc/args.out_lint new file mode 100644 index 00000000..56ed4e28 --- /dev/null +++ b/regress/roff/mc/args.out_lint @@ -0,0 +1,9 @@ +mandoc: args.in:9:6: WARNING: ignoring distance argument: mc ... suffix +mandoc: args.in:11:5: WARNING: invalid escape sequence: \C +mandoc: args.in:11:5: ERROR: skipping unusable escape sequence: mc \C +mandoc: args.in:13:5: UNSUPP: unsupported escape sequence: \! +mandoc: args.in:13:5: ERROR: skipping unusable escape sequence: mc \! +mandoc: args.in:15:5: ERROR: skipping unusable escape sequence: mc \a +mandoc: args.in:21:5: ERROR: skipping unusable escape sequence: mc \fR +mandoc: args.in:25:13: WARNING: ignoring distance argument: mc ... suffix +mandoc: args.in:27:5: ERROR: skipping unusable escape sequence: mc \o'o/' -- cgit