gnucash maint: use (string-concatenate ...) instead of (apply string-append ...)

Christopher Lam clam at code.gnucash.org
Mon May 2 09:39:40 EDT 2022


Updated	 via  https://github.com/Gnucash/gnucash/commit/56fa5949 (commit)
	from  https://github.com/Gnucash/gnucash/commit/7e4fcc7a (commit)



commit 56fa5949f9ef47a248c924b4d3b313dcf82e8754
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon May 2 09:10:21 2022 +0800

    use (string-concatenate ...) instead of (apply string-append ...)
    
    similarly to a48e656ee, string-concatenate is less vulnerable to stack
    overflow. this was confirmed by wingo some time back.

diff --git a/gnucash/report/html-text.scm b/gnucash/report/html-text.scm
index 729ff491e..8ae63946f 100644
--- a/gnucash/report/html-text.scm
+++ b/gnucash/report/html-text.scm
@@ -170,8 +170,8 @@
            ((string? rendered-elt)
             rendered-elt)
            ((list? rendered-elt)
-            (apply string-append
-                   (gnc:html-document-tree-collapse rendered-elt)))
+            (string-concatenate
+             (gnc:html-document-tree-collapse rendered-elt)))
            (#t 
             (format #f "hold on there podner. form=~s\n" rendered-elt)
             ""))))



Summary of changes:
 gnucash/report/html-text.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list