Skip to content
Commit 9d1d8e5e authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

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: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b0f2f89d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment