mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-09 01:21:05 +00:00
Fix UB in fcn_recurse (#17838)
``` fcn.c: In function 'fcn_recurse': fcn.c:229:68: warning: 'omov_aop.disp' may be used uninitialized in this function [-Wmaybe-uninitialized] if (o_reg_dst && reg_src && o_reg_dst->offset == reg_src->offset && omov_aop.disp != UT64_MAX) { fcn.c:181:10: note: 'omov_aop.disp' was declared here RAnalOp omov_aop, mov_aop = { 0 }; ^~~~~~~~ fcn.c:229:17: warning: 'reg_src' may be used uninitialized in this function [-Wmaybe-uninitialized] if (o_reg_dst && reg_src && o_reg_dst->offset == reg_src->offset && omov_aop.disp != UT64_MAX) { ^~ fcn.c:183:12: note: 'reg_src' was declared here RRegItem *reg_src, *o_reg_dst = NULL; ``` Co-authored-by: pancake <pancake@nopcode.org>
This commit is contained in:
parent
dcd0f37817
commit
cfb21c38e3
@ -178,9 +178,10 @@ static bool is_delta_pointer_table(RAnal *anal, RAnalFunction *fcn, ut64 addr, u
|
||||
/* check if current instruction is followed by an ujmp */
|
||||
ut8 buf[JMPTBL_LEA_SEARCH_SZ];
|
||||
RAnalOp *aop = jmp_aop;
|
||||
RAnalOp omov_aop, mov_aop = { 0 };
|
||||
RAnalOp omov_aop = {0};
|
||||
RAnalOp mov_aop = {0};
|
||||
RAnalOp add_aop = {0};
|
||||
RRegItem *reg_src, *o_reg_dst = NULL;
|
||||
RRegItem *reg_src = NULL, *o_reg_dst = NULL;
|
||||
RAnalValue cur_scr, cur_dst = { 0 };
|
||||
read_ahead (anal, addr, (ut8*)buf, sizeof (buf));
|
||||
bool isValid = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user