Leak "so" command (#8650)

This commit is contained in:
josediazfer 2017-10-04 23:54:44 +02:00 committed by radare
parent de35a3fb8d
commit f8d71b8ded

View File

@ -626,7 +626,6 @@ static int cmd_seek(void *data, const char *input) {
} }
case 'o': // "so" case 'o': // "so"
{ {
RAnalOp op;
int val = 0, ret, i, n = r_num_math (core->num, input + 1); int val = 0, ret, i, n = r_num_math (core->num, input + 1);
if (n == 0) { if (n == 0) {
n = 1; n = 1;
@ -644,12 +643,15 @@ static int cmd_seek(void *data, const char *input) {
val += ret; val += ret;
} else { } else {
for (val = i = 0; i < n; i++) { for (val = i = 0; i < n; i++) {
RAnalOp op;
ret = r_anal_op (core->anal, &op, ret = r_anal_op (core->anal, &op,
core->offset, core->block, core->blocksize); core->offset, core->block, core->blocksize);
if (ret < 1) { if (ret < 1) {
ret = 1; ret = 1;
} }
r_core_seek_delta (core, ret); r_core_seek_delta (core, ret);
r_anal_op_fini (&op);
val += ret; val += ret;
} }
} }