summaryrefslogtreecommitdiff
path: root/src/roff/troff
diff options
context:
space:
mode:
authorG. Branden Robinson <g.branden.robinson@gmail.com>2022-10-04 00:27:15 -0500
committerG. Branden Robinson <g.branden.robinson@gmail.com>2022-10-06 07:23:26 -0500
commit122f288e0b307c7caaac215a8cf18a96587ba6b3 (patch)
treeb6e75a96bf5b09a30ccda099757f51ef123b2b9f /src/roff/troff
parent9468de59aecf4cae43f7a015478e4282ee883f02 (diff)
downloadgroff-git-122f288e0b307c7caaac215a8cf18a96587ba6b3.tar.gz
[troff]: Fix Savannah #63151.
* src/roff/troff/input.cpp (read_draw_node): Throw "delim" warning diagnostic when a drawing escape sequence ends the line without a closing delimiter. Fixes <https://savannah.gnu.org/bugs/?63151>.
Diffstat (limited to 'src/roff/troff')
-rw-r--r--src/roff/troff/input.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 0005cdaad..fcf6b26c7 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8590,6 +8590,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;