summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2024-04-16 08:43:58 +0200
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2024-04-23 08:34:24 +0200
commit1997cdc3e727526aa5d84b32f7cbb3f56459b7ef (patch)
tree3393ccbf64d4089f8f62551b5544e5b9b10f5308 /fs
parentfs/ntfs3: Use 64 bit variable to avoid 32 bit overflow (diff)
downloadlinux-1997cdc3e727526aa5d84b32f7cbb3f56459b7ef.tar.xz
linux-1997cdc3e727526aa5d84b32f7cbb3f56459b7ef.zip
fs/ntfs3: Use variable length array instead of fixed size
Should fix smatch warning: ntfs_set_label() error: __builtin_memcpy() 'uni->name' too small (20 vs 256) Fixes: 4534a70b7056f ("fs/ntfs3: Add headers and misc files") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202401091421.3RJ24Mn3-lkp@intel.com/ Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ntfs3/ntfs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ntfs3/ntfs.h b/fs/ntfs3/ntfs.h
index 9c7478150a03..3d6143c7abc0 100644
--- a/fs/ntfs3/ntfs.h
+++ b/fs/ntfs3/ntfs.h
@@ -59,7 +59,7 @@ struct GUID {
struct cpu_str {
u8 len;
u8 unused;
- u16 name[10];
+ u16 name[];
};
struct le_str {