about summary refs log tree commit diff stats
path: root/miasm/loader/pe_init.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2021-09-20 07:39:40 +0200
committerGitHub <noreply@github.com>2021-09-20 07:39:40 +0200
commit5522eb059ad5fe2b5ef0194923b3b6c24d778946 (patch)
tree4c5d12e728b4a237333be7245cf73325582e5f6c /miasm/loader/pe_init.py
parent9a36c6d7849335c83a9460fc558afb55ff0a2aa1 (diff)
parentf2c0c38b67b65e3f5309d358c59fcee9a501854d (diff)
downloadfocaccia-miasm-5522eb059ad5fe2b5ef0194923b3b6c24d778946.tar.gz
focaccia-miasm-5522eb059ad5fe2b5ef0194923b3b6c24d778946.zip
Merge pull request #1386 from serpilliere/fix_incomplete_ircfg_analysis
Fix incomplete ircfg analysis
Diffstat (limited to 'miasm/loader/pe_init.py')
-rw-r--r--miasm/loader/pe_init.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/miasm/loader/pe_init.py b/miasm/loader/pe_init.py
index 3e0c660e..202a7b00 100644
--- a/miasm/loader/pe_init.py
+++ b/miasm/loader/pe_init.py
@@ -46,8 +46,10 @@ class ContectRva(object):
         @rva_start: rva start address
         @rva_stop: rva stop address
         """
+        if rva_start is None:
+            raise IOError("Out of range")
         if rva_start < 0:
-            raise ValueError("Out of range")
+            raise IOError("Out of range")
         if rva_stop is not None:
             if rva_stop > len(self.parent.img_rva):
                 rva_stop = len(self.parent.img_rva)