Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/mdocml/dist PR/54069: Jason Thorpe: Prevent mem...
details:   https://anonhg.NetBSD.org/src/rev/0ab7ce9b1cf7
branches:  trunk
changeset: 997843:0ab7ce9b1cf7
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 28 20:26:49 2019 +0000
description:
PR/54069: Jason Thorpe: Prevent memory overrun. Can be easily reproduced
with groff_ms.7 and -fsanitize=address.
diffstat:
 external/bsd/mdocml/dist/out.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r a9e888e061c5 -r 0ab7ce9b1cf7 external/bsd/mdocml/dist/out.c
--- a/external/bsd/mdocml/dist/out.c    Thu Mar 28 19:00:40 2019 +0000
+++ b/external/bsd/mdocml/dist/out.c    Thu Mar 28 20:26:49 2019 +0000
@@ -235,6 +235,9 @@
                        } else
                                (*gp)->wanted -= width;
                }
+               if (g->endcol > maxcol) {
+                       maxcol = g->endcol;
+               }
                if (done) {
                        *gp = g->next;
                        free(g);
Home |
Main Index |
Thread Index |
Old Index