aboutsummaryrefslogtreecommitdiff
path: root/net/unix/sysctl_net_unix.c
diff options
context:
space:
mode:
authorPhillip Lougher <[email protected]>2024-04-03 19:33:52 +0100
committerAndrew Morton <[email protected]>2024-04-25 21:07:05 -0700
commit040bf9a717885d3646dcd5b4062dc3a4877ec421 (patch)
tree9333ce6577292e6b4429e030636e14c0c916aa5a /net/unix/sysctl_net_unix.c
parent029c45bb24d02a4de7b1e3866fe7592d59c10718 (diff)
Squashfs: remove deprecated strncpy by not copying the string
Squashfs copied the passed string (name) into a temporary buffer to ensure it was NUL-terminated. This however is completely unnecessary as the string is already NUL-terminated. So remove the deprecated strncpy() by completely removing the string copy. The background behind this unnecessary string copy is that it dates back to the days when Squashfs was an out of kernel patch. The code deliberately did not assume the string was NUL-terminated in case in future this changed (due to kernel changes). This would mean the out of tree patches would be broken but still compile OK. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Phillip Lougher <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Justin Stitt <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions