You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/10/21 09:01:02 UTC

svn commit: r1534044 - /subversion/trunk/subversion/libsvn_subr/win32_xlate.c

Author: brane
Date: Mon Oct 21 07:01:02 2013
New Revision: 1534044

URL: http://svn.apache.org/r1534044
Log:
* subversion/libsvn_subr/win32_xlate.c
  (svn_subr__win32_utf8_to_utf16, svn_subr__win32_utf16_to_utf8):
   Use the variable size to calculate the buffer size, not the type.

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

Modified: subversion/trunk/subversion/libsvn_subr/win32_xlate.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/win32_xlate.c?rev=1534044&r1=1534043&r2=1534044&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/win32_xlate.c (original)
+++ subversion/trunk/subversion/libsvn_subr/win32_xlate.c Mon Oct 21 07:01:02 2013
@@ -254,7 +254,7 @@ svn_subr__win32_utf8_to_utf16(const WCHA
                               _("Conversion to UTF-16 failed"));
 
   wide_count = retval + 1;
-  wide_str = apr_palloc(result_pool, wide_count * sizeof(WCHAR));
+  wide_str = apr_palloc(result_pool, wide_count * sizeof(*wide_str));
 
   retval = MultiByteToWideChar(CP_UTF8, 0, src, utf8_count,
                                wide_str, wide_count);
@@ -286,7 +286,7 @@ svn_subr__win32_utf16_to_utf8(const char
                               _("Conversion to UTF-16 failed"));
 
   utf8_count = retval + 1;
-  utf8_str = apr_palloc(result_pool, utf8_count * sizeof(WCHAR));
+  utf8_str = apr_palloc(result_pool, utf8_count * sizeof(*utf8_str));
 
   retval = WideCharToMultiByte(CP_UTF8, 0, src, wide_count,
                                utf8_str, utf8_count, NULL, FALSE);