Nikolay Sivov : ole32: Fix length of buffer allocated by SNB_UserUnmarshal () (Valgrind).

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jun 4 09:32:02 CDT 2015


Module: wine
Branch: master
Commit: bfa23b637e903fec2424734c1927cb0fed5da689
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bfa23b637e903fec2424734c1927cb0fed5da689

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Jun  4 00:49:13 2015 +0300

ole32: Fix length of buffer allocated by SNB_UserUnmarshal() (Valgrind).

---

 dlls/ole32/usrmarshal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ole32/usrmarshal.c b/dlls/ole32/usrmarshal.c
index 2cb97f3..d22f9f7 100644
--- a/dlls/ole32/usrmarshal.c
+++ b/dlls/ole32/usrmarshal.c
@@ -2247,7 +2247,7 @@ unsigned char * __RPC_USER SNB_UserUnmarshal(ULONG *pFlags, unsigned char *pBuff
         WCHAR **ptrW;
         ULONG i;
 
-        ptrW = *pSnb = umcb->pStubMsg->pfnAllocate((wire->strcnt+1)*sizeof(WCHAR*) + wire->datalen);
+        ptrW = *pSnb = umcb->pStubMsg->pfnAllocate((wire->strcnt+1)*sizeof(WCHAR*) + wire->datalen*sizeof(WCHAR));
         dest = (WCHAR*)(*pSnb + wire->strcnt + 1);
 
         for (i = 0; i < wire->strcnt; i++)




More information about the wine-cvs mailing list