diff options
| author | _Frky <3105926+Frky@users.noreply.github.com> | 2020-05-30 15:47:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-30 15:47:22 +0200 |
| commit | 0af3b614112d7199dc077ed9d76c33f97be9709a (patch) | |
| tree | 776ad8a03a10651d540c1c7091065356f78253f4 /miasm/os_dep/win_api_x86_32.py | |
| parent | e6580f5390ad3856079b73685eef56013644f72f (diff) | |
| download | focaccia-miasm-0af3b614112d7199dc077ed9d76c33f97be9709a.tar.gz focaccia-miasm-0af3b614112d7199dc077ed9d76c33f97be9709a.zip | |
Fix bug in WideCharToMultiByte
Diffstat (limited to 'miasm/os_dep/win_api_x86_32.py')
| -rw-r--r-- | miasm/os_dep/win_api_x86_32.py | 2 |
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 |