Update of bug #68982 (group groff):
Status: Confirmed => In Progress
Summary: [troff] input `\c\e` causes assertion failure since
groff 1.24.0 => [PATCH] [troff] input `\c\e` causes assertion failure since
groff 1.24.0
_______________________________________________________
Follow-up Comment #1:
diff --git a/ChangeLog b/ChangeLog
index ff3a28327..ef3674508 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2026-12-01 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (token::next): If encountering `\e`
+ after `\c`, throw warning in category "syntax" and abort
+ processing of escape sequence instead of trying to add it as a
+ "character" to the pending output line and tripping an assertion
+ failure.
+
+ Fixes <https://savannah.gnu.org/bugs/?68982>. Problem
+ introduced by me in commit d02c13130, 2025-10-21. I had put the
+ assert(3) in deliberately to catch this sort of oversight.
+ Discovered while investigating FreeBSD #301285, which is kind of
+ a shotgun blast of a fuzzing report.
+
2026-12-01 G. Branden Robinson <[email protected]>
[groff]: Regression-test Savannah #68982.
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 678d0480b..484f255cb 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -2654,6 +2654,12 @@ void token::next()
type = TOKEN_NODE;
return;
case 'e':
+ if (curenv->get_was_line_interrupted()) {
+ warning(WARN_SYNTAX, "ignoring escaped '%1' on input line"
+ " after output line continuation escape sequence",
+ char(cc));
+ break;
+ }
goto ESCAPE_e;
case 'E':
maybe_warn_about_portability(cc);
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?68982>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
