diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-03-29 21:27:06 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-03-29 21:27:06 +0000 |
commit | 4e02ff5bbc7d9dfafc781a1534b153cae8cea86c (patch) | |
tree | 2f72c80b7c50276f77e992c16fa1cbc16d799dab /test-PATH_MAX.c | |
parent | 4af7601e56b07fe1eb2c110fd7633ef66197ae30 (diff) | |
download | mandoc-4e02ff5bbc7d9dfafc781a1534b153cae8cea86c.tar.gz |
Set the maximum column index in a tbl(7) to the maximum *right* edge
of any cell span, not to the maximum *left* edge, which may be smaller
if the last column of the table is only reached by horizontal spans,
but not by any regular cell in any row of the table.
Otherwise, the algorithm calculating column widths accessed memomy
after the end of the colwidth[] array, while it was trying to handle
the rightmost column(s).
Crash reported by Jason Thorpe <thorpej at NetBSD>
via https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54069
and via Thomas Klausner (wiz@).
Christos@ Zoulas sent a (correct, but slightly confusing) patch.
The patch i'm committing here is easier to understand.
Diffstat (limited to 'test-PATH_MAX.c')
0 files changed, 0 insertions, 0 deletions