Commit e5b4301f authored by Konstantin Komarov's avatar Konstantin Komarov Committed by Long Li
Browse files

fs/ntfs3: Use variable length array instead of fixed size

stable inclusion
from stable-v5.15.160
commit a2de301d90b782ac5d7a5fe32995caaee9ab3a0f
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA7D5A
CVE: CVE-2024-38623

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=tags/v5.15.161&id=a2de301d90b782ac5d7a5fe32995caaee9ab3a0f



--------------------------------

[ Upstream commit 1997cdc3e727526aa5d84b32f7cbb3f56459b7ef ]

Should fix smatch warning:
	ntfs_set_label() error: __builtin_memcpy() 'uni->name' too small (20 vs 256)

Fixes: 4534a70b ("fs/ntfs3: Add headers and misc files")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202401091421.3RJ24Mn3-lkp@intel.com/


Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLong Li <leo.lilong@huawei.com>
parent 5a3aeaf3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ struct GUID {
struct cpu_str {
	u8 len;
	u8 unused;
	u16 name[10];
	u16 name[];
};

struct le_str {