gbranden pushed a commit to branch master
in repository groff.

commit 2b76dd446cb370d8fc5a4219a1f887527ceaf242
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Aug 19 13:12:29 2024 -0500

    [troff]: Reject EOF as escape sequence delimiter.
    
    * src/roff/troff/input.cpp (token::is_usable_as_delimiter): Reject
      end-of-file as the starting delimiter for an escape sequence.
---
 ChangeLog                | 6 ++++++
 src/roff/troff/input.cpp | 1 +
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index ff3f657ab..12e60458a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-08-19  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (token::is_usable_as_delimiter):
+       Reject end-of-file as the starting delimiter for an escape
+       sequence.
+
 2024-08-19  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/node.cpp (make_glyph_node): Don't throw a
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 254c6d895..219576d89 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -2586,6 +2586,7 @@ bool token::is_usable_as_delimiter(bool report_error)
   case TOKEN_HORIZONTAL_SPACE:
   case TOKEN_TAB:
   case TOKEN_NEWLINE:
+  case TOKEN_EOF:
     if (report_error)
       error("%1 is not allowed as a starting delimiter", description());
     return false;

_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to