mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
040bf9a717
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> |
||
---|---|---|
.. | ||
block.c | ||
cache.c | ||
decompressor_multi_percpu.c | ||
decompressor_multi.c | ||
decompressor_single.c | ||
decompressor.c | ||
decompressor.h | ||
dir.c | ||
export.c | ||
file_cache.c | ||
file_direct.c | ||
file.c | ||
fragment.c | ||
id.c | ||
inode.c | ||
Kconfig | ||
lz4_wrapper.c | ||
lzo_wrapper.c | ||
Makefile | ||
namei.c | ||
page_actor.c | ||
page_actor.h | ||
squashfs_fs_i.h | ||
squashfs_fs_sb.h | ||
squashfs_fs.h | ||
squashfs.h | ||
super.c | ||
symlink.c | ||
xattr_id.c | ||
xattr.c | ||
xattr.h | ||
xz_wrapper.c | ||
zlib_wrapper.c | ||
zstd_wrapper.c |