Nikolay Sivov : imm32: Fix output buffer length handling for A -> W conversion case of GCS_COMPSTR.

Alexandre Julliard julliard at winehq.org
Mon Mar 11 16:29:54 CDT 2019


Module: wine
Branch: master
Commit: 0f2f72d7b9bb198a4f14c37c1b017a81b6935790
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0f2f72d7b9bb198a4f14c37c1b017a81b6935790

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Mar  7 11:23:37 2019 +0300

imm32: Fix output buffer length handling for A -> W conversion case of GCS_COMPSTR.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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

diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
index a385d88..948ef78 100644
--- a/dlls/imm32/imm.c
+++ b/dlls/imm32/imm.c
@@ -1217,7 +1217,7 @@ static INT CopyCompStringIMEtoClient(const InputContextData *data, const void *s
     if (is_himc_ime_unicode(data) ^ unicode)
     {
         if (unicode)
-            ret = MultiByteToWideChar(CP_ACP, 0, src, src_len, dst, dst_len);
+            ret = MultiByteToWideChar(CP_ACP, 0, src, src_len, dst, dst_len / sizeof(WCHAR));
         else
             ret = WideCharToMultiByte(CP_ACP, 0, src, src_len, dst, dst_len, NULL, NULL);
         ret *= char_size;




More information about the wine-cvs mailing list