Skip to content

Commit

Permalink
Fix #22334 - oob index in global for nds32 causing segfault ##crash
Browse files Browse the repository at this point in the history
* Make imm unsigned to fix shift left UB asan bugs
  • Loading branch information
radare committed Oct 21, 2023
1 parent b15706b commit 2e2f2a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libr/arch/p/nds32/nds32-dis.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static const char *mnemonic_alu21[] =
static const char *mnemonic_br2[] =
{
"ifcall", "01", "beqz", "bnez", "bgez", "bltz", "bgtz", "blez",
"10", "11", "12", "13", "bgezal", "bltzal"
"10", "11", "12", "13", "bgezal", "bltzal", "b16"
};

static const char *mnemonic_misc[] =
Expand Down Expand Up @@ -1040,8 +1040,8 @@ print_insn32 (bfd_vma pc, disassemble_info *info, uint32_t insn)
const int rt = RT5 (insn);
const int ra = RA5 (insn);
const int rb = RB5 (insn);
const int imm15s = IMMS (insn, 15);
const int imm15u = IMMU (insn, 15);
const unsigned int imm15s = IMMS (insn, 15);
const unsigned int imm15u = IMMU (insn, 15);
uint32_t shift;
fprintf_ftype func = info->fprintf_func;
void *stream = info->stream;
Expand Down

0 comments on commit 2e2f2a9

Please sign in to comment.