mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-24 16:23:49 +00:00
* Fixed infinite loop in asm_x86_olly when str == ""
This commit is contained in:
parent
76cf64671f
commit
fec51758cc
@ -29,7 +29,7 @@ static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf)
|
||||
/* attempt == 0: First attempt */
|
||||
/* constsize == 0: Address constants and inmediate data of 16/32b */
|
||||
for (constsize = 0; constsize < 4; constsize++) {
|
||||
for (attempt = 0, aop->buf_err[0] = '\0'; !aop->buf_err[0]; attempt++) {
|
||||
for (attempt = 0; ret > 0; attempt++) {
|
||||
ret = Assemble((char*)buf, a->pc, &asm_obj, attempt, constsize, aop->buf_err);
|
||||
if (ret > 0 && ret < oret) {
|
||||
oret = ret;
|
||||
@ -39,7 +39,7 @@ static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf)
|
||||
}
|
||||
}
|
||||
aop->inst_len = Assemble((char*)buf, a->pc, &asm_obj, oattempt, oconstsize, aop->buf_err);
|
||||
if (aop->buf_err[0])
|
||||
if (aop->inst_len < 0)
|
||||
aop->inst_len = 0;
|
||||
|
||||
aop->disasm_obj = &asm_obj;
|
||||
|
Loading…
x
Reference in New Issue
Block a user