gcc-plugins/stackleak: Exactly match strings instead of prefixes
[ Upstream commit 27e9faf4 ] Since STRING_CST may not be NUL terminated, strncmp() was used for check for equality. However, this may lead to mismatches for longer section names where the start matches the tested-for string. Test for exact equality by checking for the presences of NUL termination. Cc: Alexander Popov <alex.popov@linux.com> Signed-off-by:Kees Cook <keescook@chromium.org> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Loading
Please register or sign in to comment