[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62366] [tbl] core dumps if repeating character used in text block
From: |
G. Branden Robinson |
Subject: |
[bug #62366] [tbl] core dumps if repeating character used in text block |
Date: |
Tue, 26 Apr 2022 06:41:27 -0400 (EDT) |
Update of bug #62366 (project groff):
Status: In Progress => Fixed
Open/Closed: Open => Closed
Planned Release: None => 1.23.0
_______________________________________________________
Follow-up Comment #2:
commit 4f4b79b8aa0f044a3b2e6a97c8e7dd745b5eead9
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Tue Apr 26 18:04:32 2022 +1000
[tbl]: Handle `\R` sequences in text blocks robustly.
* src/preproc/tbl/table.cpp (table::add_entry): Fix SEGV when repeating
glyph table entry syntax (`\Rx`) used in a text block. Lift
extraction of entry string to be done unconditionally, rather than in
5 different special cases. This frees us up to rewrite the entry if
necessary, changing '\R' to '\&' inside a text block. Recast
diagnostic to describe the problem clearly--"bad repeated character"
suggests that something is wrong with the "argument" to `\R`, when
really the problem is the _context_.
Fixes <http://savannah.gnu.org/bugs/?62366>.
commit 19b05a9d1b7f110429cf9df1f3d9d30873d019b2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Tue Apr 26 18:02:08 2022 +1000
[tbl]: Regression-test Savannah #62366.
* src/preproc/tbl/tests/do-not-segv-when-backslash-R-in-text-block.sh:
Do it.
* src/preproc/tbl/tbl.am (tbl_TESTS): Run test.
Test fails at this commit.
commit 36edfbadb0edf858d638cd2ed3c793566e545789
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date: Tue Apr 26 11:12:54 2022 +1000
src/libs/libgroff/string.cpp: Check malloc return.
* src/libs/libgroff/string.cpp (string::extract): Check return value of
`malloc()` for nullity, and only poke into the buffer returned if it
is valid. Discovered while troubleshooting Savannah #62366.
Also update editor aid comments; drop old-style Emacs file-local
variable setting.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62366>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/