mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-04 12:36:30 +00:00
Aim to fix an ao issue
This commit is contained in:
parent
c5b62540e6
commit
3d1141ff7e
@ -14,13 +14,14 @@ struct VarUsedType {
|
||||
|
||||
R_API RAnalOp *r_anal_op_new () {
|
||||
RAnalOp *op = R_NEW0 (RAnalOp);
|
||||
if (!op) return NULL;
|
||||
op->addr = UT64_MAX;
|
||||
op->jump = UT64_MAX;
|
||||
op->fail = UT64_MAX;
|
||||
op->ptr = UT64_MAX;
|
||||
op->val = UT64_MAX;
|
||||
r_strbuf_init (&op->esil);
|
||||
if (op) {
|
||||
op->addr = UT64_MAX;
|
||||
op->jump = UT64_MAX;
|
||||
op->fail = UT64_MAX;
|
||||
op->ptr = UT64_MAX;
|
||||
op->val = UT64_MAX;
|
||||
r_strbuf_init (&op->esil);
|
||||
}
|
||||
return op;
|
||||
}
|
||||
|
||||
@ -94,7 +95,7 @@ R_API int r_anal_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int le
|
||||
}
|
||||
}
|
||||
memset (op, 0, sizeof (RAnalOp));
|
||||
if (len > 0 && anal->cur && anal->cur->op && strcmp (anal->cur->name, "null")) {
|
||||
if (len > 0 && anal->cur && anal->cur->op) {
|
||||
ret = anal->cur->op (anal, op, addr, data, len);
|
||||
op->addr = addr;
|
||||
//free the previous var in op->var
|
||||
@ -107,11 +108,12 @@ R_API int r_anal_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, int le
|
||||
op->type = R_ANAL_OP_TYPE_ILL;
|
||||
}
|
||||
} else {
|
||||
if (!memcmp (data, "\xff\xff\xff\xff", R_MIN(4, len))) {
|
||||
if (!memcmp (data, "\xff\xff\xff\xff", R_MIN (4, len))) {
|
||||
op->type = R_ANAL_OP_TYPE_ILL;
|
||||
ret = 2; // HACK
|
||||
ret = R_MIN (2, len); // HACK
|
||||
} else {
|
||||
op->type = R_ANAL_OP_TYPE_MOV;
|
||||
ret = R_MIN (2, len); // HACK
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user