gbranden pushed a commit to branch master
in repository groff.
commit 2ad19d2bea2eae19d97078910a29439c70354d72
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun May 31 22:10:36 2026 -0500
[grohtml]: Add paranoia. (2/2)
* src/devices/grohtml/post-html.cpp (html_printer::do_job_name): Add
assert(3)ion that our (C string) argument is not a null pointer. For
`NDEBUG` builds, return early if it is.
---
ChangeLog | 6 ++++++
src/devices/grohtml/post-html.cpp | 3 +++
2 files changed, 9 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index fe10d252e..2b413eff1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-05-31 G. Branden Robinson <[email protected]>
+
+ * src/devices/grohtml/post-html.cpp (html_printer::do_job_name):
+ Add paranoia. Add assert(3)ion that our (C string) argument is
+ not a null pointer. For `NDEBUG` builds, return early if it is.
+
2026-05-31 G. Branden Robinson <[email protected]>
* src/devices/grohtml/post-html.cpp (generate_img_src): Add
diff --git a/src/devices/grohtml/post-html.cpp
b/src/devices/grohtml/post-html.cpp
index 3f43252ad..8c7920ee0 100644
--- a/src/devices/grohtml/post-html.cpp
+++ b/src/devices/grohtml/post-html.cpp
@@ -3306,6 +3306,9 @@ void html_printer::insert_split_file (void)
void html_printer::do_job_name (char *name)
{
+ assert(name != 0 /* nullptr */);
+ if (0 /* nullptr */ == name)
+ return;
if (! multiple_files) {
multiple_files = TRUE;
while (name != 0 /* nullptr */ && (*name != '\0') && (' ' == *name))
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit