commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1239143 - /commons/proper/daemon/branches/1.0.x/src/native/windows/src/utils.c
Date Wed, 01 Feb 2012 14:22:30 GMT
Author: mturk
Date: Wed Feb  1 14:22:30 2012
New Revision: 1239143

URL: http://svn.apache.org/viewvc?rev=1239143&view=rev
Log:
DAEMON-233: Fix buffer overrun

Modified:
    commons/proper/daemon/branches/1.0.x/src/native/windows/src/utils.c

Modified: commons/proper/daemon/branches/1.0.x/src/native/windows/src/utils.c
URL: http://svn.apache.org/viewvc/commons/proper/daemon/branches/1.0.x/src/native/windows/src/utils.c?rev=1239143&r1=1239142&r2=1239143&view=diff
==============================================================================
--- commons/proper/daemon/branches/1.0.x/src/native/windows/src/utils.c (original)
+++ commons/proper/daemon/branches/1.0.x/src/native/windows/src/utils.c Wed Feb  1 14:22:30
2012
@@ -318,7 +318,7 @@ apxMultiSzToArrayW(APXHANDLE hPool, LPCW
 
     *lppArray = (LPWSTR *)buff;
     p = (LPWSTR)(buff + (n + 2) * sizeof(LPWSTR));
-    AplCopyMemory(p, lpString, (l + 1) * sizeof(WCHAR) + sizeof(WCHAR));
+    AplCopyMemory(p, lpString, (l + 1) * sizeof(WCHAR));
     for (i = 0; i < n; i++) {
         (*lppArray)[i] = p;
         while (*p)
@@ -347,7 +347,7 @@ apxMultiSzToArrayA(APXHANDLE hPool, LPCS
 
     *lppArray = (LPSTR *)buff;
     p = (LPSTR)(buff + (n + 2) * sizeof(LPSTR));
-    AplCopyMemory(p, lpString, (l + 1) * sizeof(CHAR) + sizeof(CHAR));
+    AplCopyMemory(p, lpString, (l + 1) * sizeof(CHAR));
     for (i = 0; i < n; i++) {
         (*lppArray)[i] = p;
         while (*p)



Mime
View raw message