Module Name: src Committed By: christos Date: Thu Mar 28 20:26:49 UTC 2019
Modified Files: src/external/bsd/mdocml/dist: out.c Log Message: PR/54069: Jason Thorpe: Prevent memory overrun. Can be easily reproduced with groff_ms.7 and -fsanitize=address. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/bsd/mdocml/dist/out.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/mdocml/dist/out.c diff -u src/external/bsd/mdocml/dist/out.c:1.3 src/external/bsd/mdocml/dist/out.c:1.4 --- src/external/bsd/mdocml/dist/out.c:1.3 Sun Mar 10 20:15:38 2019 +++ src/external/bsd/mdocml/dist/out.c Thu Mar 28 16:26:49 2019 @@ -235,6 +235,9 @@ tblcalc(struct rofftbl *tbl, const struc } else (*gp)->wanted -= width; } + if (g->endcol > maxcol) { + maxcol = g->endcol; + } if (done) { *gp = g->next; free(g);