diff options
| author | Camille Mougey <commial@gmail.com> | 2015-02-11 13:37:19 +0100 |
|---|---|---|
| committer | Camille Mougey <commial@gmail.com> | 2015-02-11 13:37:19 +0100 |
| commit | 5d0d3e5675005d38bfc926a3fe025182ade50720 (patch) | |
| tree | f5bdc465d5d31a1013e88061dd3f0145f123b987 /miasm2/core/cpu.py | |
| parent | dc916d52815feee22cc81a29fe1272278d4caefc (diff) | |
| parent | f68d21f7d8ec32d1378a403c4ccb0345f1d5ef56 (diff) | |
| download | miasm-5d0d3e5675005d38bfc926a3fe025182ade50720.tar.gz miasm-5d0d3e5675005d38bfc926a3fe025182ade50720.zip | |
Merge pull request #64 from serpilliere/bin_stream_no_len
Bin stream no len
Diffstat (limited to 'miasm2/core/cpu.py')
| -rw-r--r-- | miasm2/core/cpu.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py index d5464305..3fbe1e22 100644 --- a/miasm2/core/cpu.py +++ b/miasm2/core/cpu.py @@ -1044,10 +1044,12 @@ class cls_mn(object): # print 'len', fname, l if l is not None: # print fname, hex(bs_l), l - if bs_l * 8 - offset_b < l: - continue # print hex(offset_b) - v = cls.getbits(bs, attrib, offset_b, l) + try: + v = cls.getbits(bs, attrib, offset_b, l) + except IOError: + # Raised if offset is out of bound + continue # print 'TEST', bval, fname, offset_b, cpt, (l, fmask, fbits), # hex(v), hex(v & fmask), hex(fbits), v & fmask == fbits offset_b += l |