gbranden pushed a commit to branch master
in repository groff.

commit fc426b32f4fbe819d8bdd46a68ca8901ee414885
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri May 29 03:55:17 2026 -0500

    src/roff/troff/node.cpp: Migrate to strdup(3).
    
    * src/roff/troff/node.cpp (suppress_node::tprint): Migrate from
      libgroff's `strsave()` to POSIX's strdup(3).
    
    Continues the long process of fixing Savannah #66672.  This completes
    the migration for GNU troff (the formatter) itself.
---
 ChangeLog               | 7 +++++++
 src/roff/troff/node.cpp | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 0ae841b75..76465e2f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-05-29  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/node.cpp (suppress_node::tprint): Migrate from
+       libgroff's `strsave()` to POSIX's strdup(3).
+
+       Continues the long process of fixing Savannah #66672.
+
 2026-05-28  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/div.cpp (top_level_diversion::remove_trap)
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 0cdb52b22..89d6f1e2c 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4657,7 +4657,7 @@ void suppress_node::tprint(troff_output_file *out)
   if (is_on == 2) {
     // Save them for future bounding box limits.
     last_position = position;
-    image_filename = strsave(filename.contents());
+    image_filename = strdup(filename.contents());
     image_filename_len = strlen(image_filename);
   }
   else { // is_on = 0 or 1

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to