You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2026/04/27 16:14:43 UTC

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

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);