diff options
| -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 |