diff options
| author | serpilliere <devnull@localhost> | 2011-08-08 08:57:51 +0200 |
|---|---|---|
| committer | serpilliere <devnull@localhost> | 2011-08-08 08:57:51 +0200 |
| commit | b8b49c0635d7a96462dd58985d64cedfc1233b9e (patch) | |
| tree | a79c2521e07e4c5a727af7ed6f12a809e9414de7 /miasm/tools/emul_lib/libcodenat_interface.c | |
| parent | 03ea86a64995c659f898d324fd364839fb392d08 (diff) | |
| download | focaccia-miasm-b8b49c0635d7a96462dd58985d64cedfc1233b9e.tar.gz focaccia-miasm-b8b49c0635d7a96462dd58985d64cedfc1233b9e.zip | |
fix 32/64 issue in pe helper
Diffstat (limited to 'miasm/tools/emul_lib/libcodenat_interface.c')
| -rw-r--r-- | miasm/tools/emul_lib/libcodenat_interface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/miasm/tools/emul_lib/libcodenat_interface.c b/miasm/tools/emul_lib/libcodenat_interface.c index 05c8a539..e8a66735 100644 --- a/miasm/tools/emul_lib/libcodenat_interface.c +++ b/miasm/tools/emul_lib/libcodenat_interface.c @@ -372,13 +372,15 @@ PyObject* _vm_set_mem(PyObject *addr, PyObject *item_str) RAISE(PyExc_TypeError,"arg1 must be int"); } - printf("set addr: %X\n", val); if(!PyString_Check(item_str)) RAISE(PyExc_TypeError,"arg must be str"); buf_size = PyString_Size(item_str); PyString_AsStringAndSize(item_str, &buf_data, &length); + + printf("set addr: %X (len %x)\n", val, length); + mpn = get_memory_page_from_address(val); memcpy(mpn->ad_hp + (val-mpn->ad), buf_data, buf_size); |