From 1516421fe34d01e0bfa6fb1ac81f5162a7451193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Wei=C3=9F?= <leon.weiss@rub.de> Date: Fri, 20 Oct 2023 08:25:32 +0200 Subject: [PATCH] Treat RIZ/EIZ as an invalid register in hasBaseRegister --- irdb-libs/libIRDB-core/src/operand_csx86.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/irdb-libs/libIRDB-core/src/operand_csx86.cpp b/irdb-libs/libIRDB-core/src/operand_csx86.cpp index f7c421607..986befb9d 100644 --- a/irdb-libs/libIRDB-core/src/operand_csx86.cpp +++ b/irdb-libs/libIRDB-core/src/operand_csx86.cpp @@ -455,7 +455,10 @@ bool DecodedOperandCapstoneX86_t::hasBaseRegister() const op.mem.base==X86_REG_RIP || op.mem.base==X86_REG_EIP || op.mem.base==X86_REG_IP; - const auto br_is_valid = op.mem.base!=X86_REG_INVALID; + const auto br_is_valid = + op.mem.base != X86_REG_INVALID && + op.mem.base != X86_REG_EIZ && + op.mem.base != X86_REG_RIZ; return isMemory() && br_is_valid && !br_is_pc; } -- GitLab