From 81fee5208b90fad16e1a1d3c750e8ffe23144d8a Mon Sep 17 00:00:00 2001 From: Dan Kegel Date: Sun, 22 Jun 2008 22:37:11 -0700 Subject: [PATCH] user32: Fix buffer length thinko in dde_client.c. --- dlls/user32/dde_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/dde_client.c b/dlls/user32/dde_client.c index 31a12510cbe..83bc9fb0ffe 100644 --- a/dlls/user32/dde_client.c +++ b/dlls/user32/dde_client.c @@ -576,7 +576,7 @@ static HGLOBAL WDML_BuildExecuteCommand(WDML_CONV* pConv, LPCVOID pData, DWORD c { if (clientUnicode) { - memSize = WideCharToMultiByte( CP_ACP, 0, pData, cbData, NULL, 0, NULL, NULL); + memSize = WideCharToMultiByte( CP_ACP, 0, pData, cbData / sizeof(WCHAR), NULL, 0, NULL, NULL); } else { @@ -601,7 +601,7 @@ static HGLOBAL WDML_BuildExecuteCommand(WDML_CONV* pConv, LPCVOID pData, DWORD c { if (clientUnicode) { - WideCharToMultiByte( CP_ACP, 0, pData, cbData, pDst, memSize, NULL, NULL); + WideCharToMultiByte( CP_ACP, 0, pData, cbData / sizeof(WCHAR), pDst, memSize, NULL, NULL); } else {