aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJustin Stitt <justinstitt@google.com>2023-09-13 00:51:05 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2023-09-20 13:15:29 +0800
commit3102bbcdcd3c945ef0bcea498d3a0c6384536d6c (patch)
tree32fdec4282721d83be399637b012b8ac38f62ff7 /crypto
parent0da05a040d563d4dc5058449be37814bb5177024 (diff)
downloadlinux-3102bbcdcd3c945ef0bcea498d3a0c6384536d6c.tar.gz
crypto: qat - refactor deprecated strncpy
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. `buf` is expected to be NUL-terminated for its eventual use in `kstrtoul()` and NUL-padding is not required. Due to the above, a suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt <justinstitt@google.com> Acked-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions