about summary refs log tree commit diff stats
path: root/miasm2/core
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/core')
-rw-r--r--miasm2/core/asmbloc.py10
-rw-r--r--miasm2/core/bin_stream_ida.py6
2 files changed, 5 insertions, 11 deletions
diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py
deleted file mode 100644
index 54760f4e..00000000
--- a/miasm2/core/asmbloc.py
+++ /dev/null
@@ -1,10 +0,0 @@
-"""
-This module will be removed in favour of asmblock.py
-Cause: French tipo.
-"""
-import warnings
-from miasm2.core.asmblock import *
-
-warnings.warn('DEPRECATION WARNING: use "asmblock" sub-module instead of "asmbloc"')
-
-log_asmbloc = log_asmblock
diff --git a/miasm2/core/bin_stream_ida.py b/miasm2/core/bin_stream_ida.py
index de7bc971..f63077bf 100644
--- a/miasm2/core/bin_stream_ida.py
+++ b/miasm2/core/bin_stream_ida.py
@@ -1,5 +1,6 @@
 from idc import Byte, SegEnd
 from idautils import Segments
+from idaapi import is_mapped
 
 from miasm2.core.bin_stream import bin_stream_str
 
@@ -14,7 +15,10 @@ class bin_stream_ida(bin_stream_str):
     def _getbytes(self, start, l=1):
         o = ""
         for ad in xrange(l):
-            o += chr(Byte(ad + start - self.shift))
+            offset = ad + start - self.shift
+            if not is_mapped(offset):
+                raise IOError("not enough bytes")
+            o += chr(Byte(offset))
         return o
 
     def readbs(self, l=1):