mdocml: add patches for tbl(7) crashes

Fixes #10892
This commit is contained in:
Duncaen 2019-04-13 22:59:59 +02:00
parent f2fdfb1dda
commit 64061588fc
3 changed files with 44 additions and 1 deletions

View file

@ -0,0 +1,27 @@
===================================================================
RCS file: /vhosts/mdocml.bsd.lv/cvs/mdocml/tbl_term.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -p -r1.69 -r1.70
--- tbl_term.c 2019/03/16 21:35:48 1.69
+++ tbl_term.c 2019/03/18 08:00:34 1.70
@@ -629,7 +629,8 @@ tbl_hrule(struct termp *tp, const struct tbl_span *spp
lw = cpp == NULL || cpn == NULL ||
(cpn->pos != TBL_CELL_DOWN &&
- (dpn == NULL || strcmp(dpn->string, "\\^") != 0))
+ (dpn == NULL || dpn->string == NULL ||
+ strcmp(dpn->string, "\\^") != 0))
? hw : 0;
tbl_direct_border(tp, BHORIZ * lw,
col->width + col->spacing / 2);
@@ -675,7 +676,8 @@ tbl_hrule(struct termp *tp, const struct tbl_span *spp
rw = cpp == NULL || cpn == NULL ||
(cpn->pos != TBL_CELL_DOWN &&
- (dpn == NULL || strcmp(dpn->string, "\\^") != 0))
+ (dpn == NULL || dpn->string == NULL ||
+ strcmp(dpn->string, "\\^") != 0))
? hw : 0;
/* The line crossing at the end of this column. */

View file

@ -0,0 +1,16 @@
===================================================================
RCS file: /vhosts/mdocml.bsd.lv/cvs/mdocml/out.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -p -r1.77 -r1.78
--- out.c 2018/12/13 11:55:47 1.77
+++ out.c 2019/03/29 21:27:06 1.78
@@ -149,7 +149,7 @@ tblcalc(struct rofftbl *tbl, const struct tbl_span *sp
gp = &first_group;
for (dp = sp->first; dp != NULL; dp = dp->next) {
icol = dp->layout->col;
- while (icol > maxcol)
+ while (maxcol < icol + dp->hspans)
tbl->cols[++maxcol].spacing = SIZE_MAX;
col = tbl->cols + icol;
col->flags |= dp->layout->flags;

View file

@ -1,7 +1,7 @@
# Template file for 'mdocml'
pkgname=mdocml
version=1.14.5
revision=1
revision=2
wrksrc="mandoc-${version}"
build_style=configure
makedepends="zlib-devel"