Commit 29060633 authored by Binbin Wu's avatar Binbin Wu Committed by Ingo Molnar
Browse files

selftests/x86/lam: Zero out buffer for readlink()

Zero out the buffer for readlink() since readlink() does not append a
terminating null byte to the buffer.  Also change the buffer length
passed to readlink() to 'PATH_MAX - 1' to ensure the resulting string
is always null terminated.

Fixes: 833c12ce

 ("selftests/x86/lam: Add inherit test cases for linear-address masking")
Signed-off-by: default avatarBinbin Wu <binbin.wu@linux.intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/r/20231016062446.695-1-binbin.wu@linux.intel.com
parent d6f274b7
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment