diff options
author | Andy Shevchenko <[email protected]> | 2023-11-20 17:11:43 +0200 |
---|---|---|
committer | Kees Cook <[email protected]> | 2023-12-01 09:51:43 -0800 |
commit | fd0cd057a1b7351604daa6ffc91dfe28adf7225d (patch) | |
tree | fb45fc893570915c2f41baacb008412b60671404 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 12cd3cd8c797e07afcc47bc4afa760e4ec75e9d7 (diff) |
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: Luis Chamberlain <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions