diff options
| author | Pierre Lalet <pierre@droids-corp.org> | 2015-02-18 20:55:26 +0100 |
|---|---|---|
| committer | Pierre Lalet <pierre@droids-corp.org> | 2015-02-18 20:55:26 +0100 |
| commit | 736befb2b6fab02e601eae392a9969ac91f2caa3 (patch) | |
| tree | 66b6208ca4ca21ac8efb3606930ffb664ecddc69 /miasm2/os_dep/linux_stdlib.py | |
| parent | 5b3589b4735024e96becb5dbd8d25de4416f7cfb (diff) | |
| parent | df19d375b8552406de77290c95ff41ef366b76c6 (diff) | |
| download | miasm-736befb2b6fab02e601eae392a9969ac91f2caa3.tar.gz miasm-736befb2b6fab02e601eae392a9969ac91f2caa3.zip | |
Merge pull request #76 from commial/pylinting
Pylinting (thanks for this work!)
Diffstat (limited to 'miasm2/os_dep/linux_stdlib.py')
| -rw-r--r-- | miasm2/os_dep/linux_stdlib.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/miasm2/os_dep/linux_stdlib.py b/miasm2/os_dep/linux_stdlib.py index 9dbc6c60..57424995 100644 --- a/miasm2/os_dep/linux_stdlib.py +++ b/miasm2/os_dep/linux_stdlib.py @@ -54,18 +54,18 @@ def xxx_snprintf(jitter): writes to string str according to format format and at most size bytes. ''' - ret_addr, (str, size, format) = jitter.func_args_stdcall(3) + ret_addr, (string, size, fmt) = jitter.func_args_stdcall(3) curarg, output = 3, '' while True: - c = jitter.vm.get_mem(format, 1) - format += 1 + c = jitter.vm.get_mem(fmt, 1) + fmt += 1 if c == '\x00': break if c == '%': token = '%' while True: - c = jitter.vm.get_mem(format, 1) - format += 1 + c = jitter.vm.get_mem(fmt, 1) + fmt += 1 token += c if c in '%cdfsux': break @@ -74,5 +74,5 @@ def xxx_snprintf(jitter): output += c output = output[:size - 1] ret = len(output) - jitter.vm.set_mem(str, output + '\x00') + jitter.vm.set_mem(string, output + '\x00') return jitter.func_ret_stdcall(ret_addr, ret) |