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

[email protected]
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <177730648300.3608061.7115175524926188251@svn03-he-fi>
Author: ivan
Date: Mon Apr 27 16:14:42 2026
New Revision: 1933394

Log:
* subversion/libsvn_subr/win32_xlate.c
  (svn_subr__win32_xlate_to_stringbuf): Use actual return value from
   MultiByteToWideChar() instead of estimated buffer size returned
   from previous call to MultiByteToWideChar().

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

Modified: subversion/trunk/subversion/libsvn_subr/win32_xlate.c
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/win32_xlate.c	Mon Apr 27 15:57:51 2026	(r1933393)
+++ subversion/trunk/subversion/libsvn_subr/win32_xlate.c	Mon Apr 27 16:14:42 2026	(r1933394)
@@ -228,6 +228,10 @@ svn_subr__win32_xlate_to_stringbuf(svn_s
   if (retval == 0)
     return apr_get_os_error();
 
+  /* Theoretically the actual size can be different from the estimated
+     size. */
+  wide_size = retval;
+
   retval = WideCharToMultiByte(handle->to_page_id, 0, wide_str, wide_size,
                                NULL, 0, NULL, NULL);
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.