mirror of
https://github.com/apache/nuttx.git
synced 2026-08-03 21:29:02 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue