From ad51286e2b00f0e2bdd080397f4287646f512ef1 Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Tue, 27 Aug 2024 14:48:12 -0500 Subject: [PATCH] cpukit/stackchk: Remove additional offset of SANITY_PATTERN_SIZE_WORDS This offset is already accounted for by Stack_check_Usable_stack_start() called from Stack_check_Visit_stack() and adding it a second time can cause interaction beyond the bounds of the stack. --- cpukit/libmisc/stackchk/check.c | 1 - 1 file changed, 1 deletion(-) diff --git a/cpukit/libmisc/stackchk/check.c b/cpukit/libmisc/stackchk/check.c index 93ab9d78e4..a4f40cea38 100644 --- a/cpukit/libmisc/stackchk/check.c +++ b/cpukit/libmisc/stackchk/check.c @@ -409,7 +409,6 @@ static inline void *Stack_check_Find_high_water_mark( * match pattern */ - base += SANITY_PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) return (void *) base;