gbranden pushed a commit to branch master
in repository groff.
commit 139b69eabdaea14abcbd8f855b7e144830aec06c
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 23 21:51:06 2026 -0600
[grotty]: Nullify invalidated pointer.
* src/devices/grotty/tty.cpp (tty_printer::end_page): Nullify `lines`
pointer after invalidating it.
---
ChangeLog | 5 +++++
src/devices/grotty/tty.cpp | 1 +
2 files changed, 6 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index b335b9dd2..2f1bc1301 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2026-11-23 G. Branden Robinson <[email protected]>
+
+ * src/devices/grotty/tty.cpp (tty_printer::end_page): Nullify
+ `lines` pointer after invalidating it.
+
2026-11-23 G. Branden Robinson <[email protected]>
* src/roff/troff/env.cpp (print_environment_request): Alter
diff --git a/src/devices/grotty/tty.cpp b/src/devices/grotty/tty.cpp
index 15e7a3f2d..95a05e0f5 100644
--- a/src/devices/grotty/tty.cpp
+++ b/src/devices/grotty/tty.cpp
@@ -1017,6 +1017,7 @@ void tty_printer::end_page(int page_length)
putchar('\n');
}
delete[] lines;
+ lines = 0 /* nullptr */;
}
font *tty_printer::make_font(const char *nm)
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit