Coverifix for rpnesil

This commit is contained in:
jvoisin 2014-08-20 21:09:01 +02:00
parent 029c11a4b5
commit 32743f0312
3 changed files with 8 additions and 10 deletions

View File

@ -435,7 +435,7 @@ ut64 extract_unknown_op(ut64 ranal2_op_type) {
ut64 extract_bin_op(ut64 ranal2_op_type) {
ut64 bin_op_val = ranal2_op_type & (R_ANAL_EX_BIN_OP | 0x7FFFF);
ut64 bin_op_val = ranal2_op_type & (R_ANAL_EX_BIN_OP | 0x80000);
switch (bin_op_val) {
case R_ANAL_EX_BINOP_XCHG:return R_ANAL_OP_TYPE_XCHG;
case R_ANAL_EX_BINOP_CMP: return R_ANAL_OP_TYPE_CMP;

View File

@ -116,10 +116,6 @@ R_API int r_anal_op_execute (RAnal *anal, RAnalOp *op) {
}
if (anal->queued) {
if (op && op->delay>0) {
eprintf ("Exception! two consecutive delayed instructions\n");
return R_FALSE;
}
anal->queued->delay--;
if (anal->queued->delay == 0) {
r_anal_op_execute (anal, anal->queued);

View File

@ -271,7 +271,8 @@ R_API int r_anal_esil_get_parm (RAnalEsil *esil, const char *str, ut64 *num) {
*num = r_num_get (NULL, str);
return R_TRUE;
case R_ANAL_ESIL_PARM_REG:
esil_reg_read (esil, str, num);
if (!esil_reg_read (esil, str, num))
break;
return R_TRUE;
default:
eprintf ("Invalid arg (%s)\n", str);
@ -340,10 +341,11 @@ static int esil_eq (RAnalEsil *esil) {
if (r_anal_esil_get_parm_type (esil, src) != R_ANAL_ESIL_PARM_INTERNAL) //necessary for some flag-things
esil->cur = num;
n = num;
esil_reg_read (esil, dst, &num);
if (r_anal_esil_get_parm_type (esil, src) != R_ANAL_ESIL_PARM_INTERNAL)
esil->old = num;
ret = esil_reg_write (esil, dst, n);
if (esil_reg_read (esil, dst, &num)) {
if (r_anal_esil_get_parm_type (esil, src) != R_ANAL_ESIL_PARM_INTERNAL)
esil->old = num;
ret = esil_reg_write (esil, dst, n);
} else eprintf ("esil_eq: invalid dest\n");
} else eprintf ("esil_eq: invalid src\n");
} else {
eprintf ("esil_eq: invalid parameters\n");