bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #63151] [troff] no diagnostic if drawing escape sequence ends witho


From: G. Branden Robinson
Subject: [bug #63151] [troff] no diagnostic if drawing escape sequence ends without delimiter
Date: Tue, 4 Oct 2022 01:25:03 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?63151>

                 Summary: [troff] no diagnostic if drawing escape sequence
ends without delimiter
                 Project: GNU troff
               Submitter: gbranden
               Submitted: Tue 04 Oct 2022 05:25:01 AM UTC
                Category: Core
                Severity: 3 - Normal
              Item Group: Warning/Suspicious behaviour
                  Status: In Progress
                 Privacy: Public
             Assigned to: gbranden
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 04 Oct 2022 05:25:01 AM UTC By: G. Branden Robinson <gbranden>
Affects groff 1.22.4.


$ groff --version | head -n 1
GNU groff version 1.22.4
$ printf '\\D@l 100u 0\n' | groff -Tascii 2>&1 | grep . || echo EMPTY
EMPTY


I have a fix in progress.


diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 0005cdaad..3a008b01d 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8590,6 +8592,12 @@ static node *read_draw_node()
          maxpoints *= 2;
          delete[] oldpoint;
        }
+       if (tok.is_newline() || tok.is_eof()) {
+         warning(WARN_DELIM, "missing closing delimiter in drawing"
+                 " escape sequence (got %1)", tok.description());
+         err = true;
+         break;
+       }
        if (!get_hunits(&point[i].h,
                        type == 'f' || type == 't' ? 'u' : 'm')) {
          err = true;








    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63151>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]