summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@squashfs.org.uk>2024-04-03 21:33:52 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-04-26 07:07:05 +0300
commit040bf9a717885d3646dcd5b4062dc3a4877ec421 (patch)
tree9333ce6577292e6b4429e030636e14c0c916aa5a /scripts/gdb/linux/utils.py
parent029c45bb24d02a4de7b1e3866fe7592d59c10718 (diff)
downloadlinux-040bf9a717885d3646dcd5b4062dc3a4877ec421.tar.xz
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/20240403183352.391308-1-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions