keithmarshall pushed a commit to branch master in repository groff. commit 8830820a9a85ad52a8452017d52e67378a76c4c4 Author: Keith Marshall <keith.d.marsh...@ntlworld.com> AuthorDate: Sat Oct 23 21:56:31 2021 +0100
[ms]: Defend against uncontrolled page trap recursion. * tmac/s.tmac (pg@top) [HM+FM+.V>.p]: Diagnose insufficient page length, and abort; cf. <https://savannah.gnu.org/bugs/?61294> --- ChangeLog | 7 +++++++ tmac/s.tmac | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a3a3f54..0de438e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-10-23 Keith Marshall <keith.d.marsh...@ntlworld.com> + + [ms]: Defend against uncontrolled page trap recursion. + + * tmac/s.tmac (pg@top) [HM+FM+.V>.p]: Diagnose insufficient page + length, and abort; cf. <https://savannah.gnu.org/bugs/?61294> + 2021-10-21 G. Branden Robinson <g.branden.robin...@gmail.com> * tmac/tmac.am: Build more quietly. diff --git a/tmac/s.tmac b/tmac/s.tmac index 186951f..735e50e 100644 --- a/tmac/s.tmac +++ b/tmac/s.tmac @@ -566,8 +566,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. .de 1C .MC \\n[LL]u .. -.\" top of page macro .de pg@top +.\" Invoked by '.wh 0' trap at the top of every page. +.\" At short page length, recursion may occur; ensure +.\" that page length is sufficient to avoid it. +.if (u;\\n[HM]+\\n[FM])+\n[.V]>\\n[.p]) \{\ +. ds pg*pl-abort-msg] "\*[@s]:\" +. if !'\\n[.F]'' .as pg*pl-abort-msg "\\n[.F]:\" +. if !'\\n[.c]'0' .as pg*pl-abort-msg "\\n[.c]:\" +. as pg*pl-abort-msg " abort: insufficient page length specified\" +. ab \\*[pg*pl-abort-msg] +. \} .ch pg*footer -\\n[FM]u/2u .nr pg*col-num 0 .nr pg@fn-bottom-margin 0 _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit