diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-06-01 04:56:50 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-06-01 04:56:50 +0000 |
commit | 30db3fcdde288bc9fef7a66ce0cb4231bd941bba (patch) | |
tree | ea0976081f5cffadcce2f4234975b85c843f1c65 /mdoc_term.c | |
parent | c1b7370d9954e5b822279efca805c0e8a7c7f379 (diff) | |
download | mandoc-30db3fcdde288bc9fef7a66ce0cb4231bd941bba.tar.gz mandoc-30db3fcdde288bc9fef7a66ce0cb4231bd941bba.tar.zst mandoc-30db3fcdde288bc9fef7a66ce0cb4231bd941bba.zip |
If a table contained at least one complete line
and on its last line, the first T{ remained unclosed,
roff_parseln() never returned ROFF_TBL for that last line,
so {man,mdoc}_addspan() never got called for that last line,
so we ended up with a table
where no line associated with a node had TBL_SPAN_LAST set,
so tbl_term() never free()'d the cols in struct roffcol,
so tblcalc() crashed on the NULL == tbl->cols assertion
when starting the *next* table in the same file.
Fix this by returning ROFF_TBL as soon as we open a data cell,
not only when finishing it - as explained above, it may never
get properly closed but instead be interrupted by .TE.
Problem reported by bentley@ in latex2man.1.
I love it when bugs take half a day to debug but
the fix turns out to be flipping one single bit in the source code.
Diffstat (limited to 'mdoc_term.c')
0 files changed, 0 insertions, 0 deletions