-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/arch/X86/X86Mapping.c b/arch/X86/X86Mapping.c | ||
index f7d35d2..16450d1 100644 | ||
--- a/arch/X86/X86Mapping.c | ||
+++ b/arch/X86/X86Mapping.c | ||
@@ -2780,7 +2780,7 @@ x86_reg X86_insn_reg_intel(unsigned int id, enum cs_ac_type *access) | ||
intel_regs_sorted = true; | ||
} | ||
|
||
- while (first <= last) { | ||
+ while (first <= last && mid < ARR_SIZE(insn_regs_intel)) { | ||
if (insn_regs_intel_sorted[mid].insn < id) { | ||
first = mid + 1; | ||
} else if (insn_regs_intel_sorted[mid].insn == id) { |