diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2014-10-01 14:36:56 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2014-10-01 14:36:56 +0200 |
| commit | 7d7df97699ab77c0d5e39db6aefa3432bb76cea0 (patch) | |
| tree | 60b18cc221c7b0fb3a3a016130a920a8ceb9a5a7 | |
| parent | 6317588a7df1fb600cb1d9b218ef8c248255be64 (diff) | |
| download | miasm-7d7df97699ab77c0d5e39db6aefa3432bb76cea0.tar.gz miasm-7d7df97699ab77c0d5e39db6aefa3432bb76cea0.zip | |
win_api: add msvcrt strlen
| -rw-r--r-- | miasm2/jitter/os_dep/win_api_x86_32.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/miasm2/jitter/os_dep/win_api_x86_32.py b/miasm2/jitter/os_dep/win_api_x86_32.py index 9a35d62b..4692f8ab 100644 --- a/miasm2/jitter/os_dep/win_api_x86_32.py +++ b/miasm2/jitter/os_dep/win_api_x86_32.py @@ -2954,3 +2954,11 @@ def msvcrt__wfopen(myjit): def msvcrt_fopen(myjit): msvcrt_myfopen(myjit, get_str_ansi) + + +def msvcrt_strlen(myjit): + ret_ad, args = myjit.func_args_cdecl(1) + src, = args + + s = get_str_ansi(myjit, src) + myjit.func_ret_cdecl(ret_ad, len(s)) |