diff options
| author | Vikas Gupta <vikasgupta.nit@gmail.com> | 2019-02-13 18:14:38 +0800 |
|---|---|---|
| committer | Vikas Gupta <vikasgupta.nit@gmail.com> | 2019-02-13 18:14:38 +0800 |
| commit | 92cbd7774678749895b2bc8b5fd0214fa3c66ebc (patch) | |
| tree | a3f969570650fc0519abcbe18289020891bb466a /miasm2/core/bin_stream_ida.py | |
| parent | ca0da14cd8f74e660442336d6c0d323c2314bb0d (diff) | |
| download | focaccia-miasm-92cbd7774678749895b2bc8b5fd0214fa3c66ebc.tar.gz focaccia-miasm-92cbd7774678749895b2bc8b5fd0214fa3c66ebc.zip | |
changed self.shift to self.base_address
Diffstat (limited to 'miasm2/core/bin_stream_ida.py')
| -rw-r--r-- | miasm2/core/bin_stream_ida.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/core/bin_stream_ida.py b/miasm2/core/bin_stream_ida.py index f63077bf..fcd89f9f 100644 --- a/miasm2/core/bin_stream_ida.py +++ b/miasm2/core/bin_stream_ida.py @@ -15,7 +15,7 @@ class bin_stream_ida(bin_stream_str): def _getbytes(self, start, l=1): o = "" for ad in xrange(l): - offset = ad + start - self.shift + offset = ad + start + self.base_address if not is_mapped(offset): raise IOError("not enough bytes") o += chr(Byte(offset)) @@ -38,6 +38,6 @@ class bin_stream_ida(bin_stream_str): # Lazy version if hasattr(self, "_getlen"): return self._getlen - max_addr = SegEnd(list(Segments())[-1] - (self.offset + self.shift)) + max_addr = SegEnd(list(Segments())[-1] - (self.offset - self.base_address)) self._getlen = max_addr return max_addr |