about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm/os_dep/win_api_x86_32.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/miasm/os_dep/win_api_x86_32.py b/miasm/os_dep/win_api_x86_32.py
index d73b2c08..e83a3993 100644
--- a/miasm/os_dep/win_api_x86_32.py
+++ b/miasm/os_dep/win_api_x86_32.py
@@ -1722,7 +1722,7 @@ def kernel32_WideCharToMultiByte(jitter):
       ])
     if args.CodePage != CP_ACP and args.CodePage != CP_1252:
         raise NotImplementedError
-    src = jitter.vm.get_mem(args.lpWideCharStr, args.cchWideChar)
+    src = jitter.vm.get_mem(args.lpWideCharStr, args.cchWideChar * 2)
     dst = src.decode("utf-16le").encode("cp1252", errors="replace")
     if args.cbMultiByte > 0:
         # return value is the number of bytes written