gbranden pushed a commit to branch master
in repository groff.

commit 0ece6ef1ffb5cdc5ee14de5b68dc71ab16081c6f
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Jul 22 00:13:47 2026 -0500

    [pic]: Partially migrate to strdup(3).
    
    * src/preproc/pic/lex.cpp (process_body): Migrate from libgroff's
      `strsave()` to POSIX's strdup(3).
    
    Continues the long process of fixing Savannah #66672.
---
 ChangeLog               | 7 +++++++
 src/preproc/pic/lex.cpp | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index fd551b925..a76e9cc81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-07-22  G. Branden Robinson <[email protected]>
+
+       [pic]: Partially migrate to strdup(3).
+
+       * src/preproc/pic/lex.cpp (process_body): Migrate from
+       libgroff's `strsave()` to POSIX's strdup(3).
+
 2026-11-15  G. Branden Robinson <[email protected]>
 
        [libgroff]: Slightly refactor; use default argument.
diff --git a/src/preproc/pic/lex.cpp b/src/preproc/pic/lex.cpp
index 7ea317786..8ad58bbd9 100644
--- a/src/preproc/pic/lex.cpp
+++ b/src/preproc/pic/lex.cpp
@@ -180,7 +180,7 @@ int macro_input::peek()
 
 static char *process_body(const char *body)
 {
-  char *s = strsave(body);
+  char *s = strdup(body);
   size_t j = 0;
   for (size_t i = 0; s[i] != '\0'; i++)
     if (s[i] == '$' && csdigit(s[i + 1])) {

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

Reply via email to