Skip to content

Commit

Permalink
HPPA dissassembler fix unitialized variables errors (#2309)
Browse files Browse the repository at this point in the history
  • Loading branch information
R33v0LT authored Apr 10, 2024
1 parent cda40c6 commit a5cf15e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/HPPA/HPPADisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -2503,7 +2503,7 @@ static void fill_spop_mods(uint32_t insn, uint32_t ext, hppa_ext *hppa_ext)
get_insn_field(insn, 27, 31);
break;
default:
break;
return;
}
push_int_modifier(hppa_ext, sop);
if (n == 1) {
Expand Down Expand Up @@ -2833,7 +2833,7 @@ static bool decode_copr(const cs_struct *ud, MCInst *MI, uint32_t insn)
->is_alternative = true;
}
}
} else if (class == 3) {
} else {
subop = get_insn_field(insn, 16, 18);
if (subop >= 4) {
return false;
Expand Down Expand Up @@ -2888,7 +2888,7 @@ static bool decode_copr(const cs_struct *ud, MCInst *MI, uint32_t insn)
default:
return false;
}
} else if (class == 3) {
} else {
subop = get_insn_field(insn, 16, 18);
switch (subop) {
case 0x00:
Expand Down
2 changes: 2 additions & 0 deletions cstool/cstool_hppa.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ void print_insn_detail_hppa(csh handle, cs_insn *ins)
cs_hppa_op *op = &(hppa->operands[i]);
uint64_t target_addr;
switch (op->type) {
default:
break;
case HPPA_OP_REG:
printf("\t\toperands[%u].type: REG = %s\n", i,
cs_reg_name(handle, op->reg));
Expand Down

0 comments on commit a5cf15e

Please sign in to comment.