Commit fd0cd057 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Kees Cook
Browse files

params: Do not go over the limit when getting the string length



We can use strnlen() even on early stages and it prevents from
going over the string boundaries in case it's already too long.

Reviewed-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20231120151419.1661807-3-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 12cd3cd8
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