subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1534044 - /subversion/trunk/subversion/libsvn_subr/win32_xlate.c
Date Mon, 21 Oct 2013 07:01:02 GMT
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);



Mime
View raw message