Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion libr/anal/p/anal_tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,9 @@ static inline void tp_state_reset(TypePropState *state) {
state->str_flag = false;
state->prop = false;
state->prev_dest = NULL;
state->prev_var = NULL;
state->userfnc = false;
memset (state->prev_type, 0, sizeof (state->prev_type));
}

static inline void tp_state_fini(TypePropState *state) {
Expand Down Expand Up @@ -1440,6 +1443,9 @@ R_API void r_anal_type_match(RAnal *anal, RAnalFunction *fcn) {
retries--;
goto repeat;
}
R_FREE (tp_state.ret_type);
R_FREE (tp_state.ret_reg);
tp_state.resolved = false;
ut64 bb_addr = bb->addr;
ut64 bb_size = bb->size;
const ut64 buf_size = bb->size + 32;
Expand Down Expand Up @@ -1659,7 +1665,7 @@ R_API void r_anal_type_match(RAnal *anal, RAnalFunction *fcn) {
// Type propagation using instruction access pattern
if (var) {
bool sign = false;
if ((type == R_ANAL_OP_TYPE_CMP) && next_op) {
if ((type == R_ANAL_OP_TYPE_CMP) && next_op && (next_op->type == R_ANAL_OP_TYPE_CJMP)) {
if (next_op->sign) {
sign = true;
} else {
Expand Down
2 changes: 1 addition & 1 deletion libr/core/casm.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ R_API RList *r_core_asm_bwdisassemble(RCore *core, ut64 addr, int n, int len) {

r_asm_set_pc (core->rasm, at);
for (hit_count = 0; hit_count < n; hit_count++) {
RAnalOp op;
RAnalOp op = {0};
int instrlen = r_asm_disassemble (core->rasm, &op,
buf + len - addrbytes * (addr - at), addrbytes * (addr - at));
add_hit_to_hits (hits, at, instrlen, true);
Expand Down
Loading