Skip to content

Commit bb21658

Browse files
committed
Fix QDB crash on allocation boundaries
1 parent dacc8e0 commit bb21658

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiling/debugger/qdb/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def disasm(self, address: int, detail: bool = False) -> InsnLike:
5757
"""Helper function for disassembling.
5858
"""
5959

60-
insn_bytes = self.read_insn(address)
60+
insn_bytes = self.read_insn(address) or b''
6161
insn = None
6262

6363
if insn_bytes:
@@ -75,7 +75,7 @@ def disasm_lite(self, address: int) -> Tuple[int, int, str, str]:
7575
A tuple of: instruction address, size, mnemonic and operands
7676
"""
7777

78-
insn_bytes = self.read_insn(address)
78+
insn_bytes = self.read_insn(address) or b''
7979
insn = None
8080

8181
if insn_bytes:

0 commit comments

Comments
 (0)