sim: use correct size to avoid buffer overflow
Fix buffer overflow issue from PR #10128, since the sizeof xcpt_reg_t is different on 32/64 bit platform. Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
This commit is contained in:
parent
60c4d61c02
commit
fd34be15eb
@ -113,7 +113,7 @@ void up_initial_state(struct tcb_s *tcb)
|
||||
|
||||
/* Mask the interrupt until switching to the new task */
|
||||
|
||||
memset(&tcb->xcp.regs[JB_FLAG], 0xff, sizeof(xcpt_reg_t) * 2);
|
||||
memset(&tcb->xcp.regs[JB_FLAG], 0xff, sizeof(uint32_t) * 2);
|
||||
|
||||
tcb->xcp.regs[JB_PC] = (xcpt_reg_t)pre_start;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user