svn commit: r1934509 - subversion/trunk/subversion/libsvn_subr

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <177947089667.2143681.5790609264910243993@svn03-he-fi>
Author: rinrab
Date: Fri May 22 17:28:16 2026
New Revision: 1934509

Log:
Follow-up to r1934423: Allocate right amount of memory for the EOL of the
result string in svn_utf__cstring_utf8_align_right().

* subversion/libsvn_subr/utf8proc.c
  (svn_utf__cstring_utf8_align_right): Ditto.

Modified:
   subversion/trunk/subversion/libsvn_subr/utf8proc.c

Modified: subversion/trunk/subversion/libsvn_subr/utf8proc.c
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc.c	Fri May 22 17:26:04 2026	(r1934508)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc.c	Fri May 22 17:28:16 2026	(r1934509)
@@ -679,7 +679,7 @@ svn_utf__cstring_utf8_align_right(const
   else
     {
       int spaces = padding - width;
-      char *result = apr_palloc(pool, size + spaces);
+      char *result = apr_palloc(pool, size + spaces + 1);
       memset(result, ' ', spaces);
       memcpy(result + spaces, cstr, size);
       result[size + spaces] = '\0';
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.