mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
arch: fixed error in the calculation of nwords caused an out of bounds
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
committed by
Masayuki Ishikawa
parent
a581b99266
commit
12bb4f04f1
@@ -172,7 +172,7 @@ void sparc_stack_color(void *stackbase, size_t nbytes)
|
||||
}
|
||||
|
||||
stkend = STACK_ALIGN_DOWN(stkend);
|
||||
nwords = (stkend - (uintptr_t)stackbase) >> 2;
|
||||
nwords = (stkend - (uintptr_t)stkptr) >> 2;
|
||||
|
||||
/* Set the entire stack to the coloration value */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user