diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2014-12-09 17:15:10 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2014-12-09 17:15:10 +0100 |
| commit | 915a3e1ae946bf2a7b773f4dbdfe76dcff025d3e (patch) | |
| tree | 39e3571e09a3af5920a016cbd9aafb14d2d6a11e /miasm2/analysis/sandbox.py | |
| parent | 3d309ba48a816dc3a634e90b40c5214c3f16dc09 (diff) | |
| download | miasm-915a3e1ae946bf2a7b773f4dbdfe76dcff025d3e.tar.gz miasm-915a3e1ae946bf2a7b773f4dbdfe76dcff025d3e.zip | |
SandboxLinux: entry_point was inexistant, options.address was ignored
Diffstat (limited to 'miasm2/analysis/sandbox.py')
| -rw-r--r-- | miasm2/analysis/sandbox.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/miasm2/analysis/sandbox.py b/miasm2/analysis/sandbox.py index 8676f373..f7009f3e 100644 --- a/miasm2/analysis/sandbox.py +++ b/miasm2/analysis/sandbox.py @@ -232,6 +232,8 @@ class OS_Linux(OS): self.elf = elf preload_elf(self.jitter.vm, elf, libs) + self.entry_point = elf.Ehdr.entry + # Library calls handler self.jitter.add_lib_handler(libs, custom_methods) @@ -348,7 +350,7 @@ class Sandbox_Linux_x86_32(Sandbox, Arch_x86_32, OS_Linux): """ If addr is not set, use entrypoint """ - if addr is None: + if addr is None and self.options.address is None: addr = self.entry_point super(Sandbox_Linux_x86_32, self).run(addr) |