All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
To: <ntfs3@lists.linux.dev>
Cc: <linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
	Konstantin Komarov <almaz.alexandrovich@paragon-software.com>,
	kernel test robot <lkp@intel.com>,
	Dan Carpenter <dan.carpenter@linaro.org>
Subject: [PATCH 6/9] fs/ntfs3: Use variable length array instead of fixed size
Date: Tue, 23 Apr 2024 09:44:25 +0300	[thread overview]
Message-ID: <20240423064428.8289-7-almaz.alexandrovich@paragon-software.com> (raw)
In-Reply-To: <20240423064428.8289-1-almaz.alexandrovich@paragon-software.com>

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>
---
 fs/ntfs3/ntfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 {
-- 
2.34.1


  parent reply	other threads:[~2024-04-23  6:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  6:44 [PATCH v2 0/9] Bugfix and refactoring Konstantin Komarov
2024-04-23  6:44 ` [PATCH 1/9] fs/ntfs3: Taking DOS names into account during link counting Konstantin Komarov
2024-04-23  6:44 ` [PATCH 2/9] fs/ntfs3: Remove max link count info display during driver init Konstantin Komarov
2024-04-23  6:44 ` [PATCH 3/9] fs/ntfs3: Missed le32_to_cpu conversion Konstantin Komarov
2024-04-23  6:44 ` [PATCH 4/9] fs/ntfs3: Check 'folio' pointer for NULL Konstantin Komarov
2024-04-23  6:44 ` [PATCH 5/9] fs/ntfs3: Use 64 bit variable to avoid 32 bit overflow Konstantin Komarov
2024-04-23  6:44 ` Konstantin Komarov [this message]
2024-04-23  6:44 ` [PATCH 7/9] fs/ntfs3: Redesign ntfs_create_inode to return error code instead of inode Konstantin Komarov
2024-04-23  6:44 ` [PATCH 8/9] fs/ntfs3: Always make file nonresident on fallocate call Konstantin Komarov
2024-04-23  6:44 ` [PATCH 9/9] fs/ntfs3: Mark volume as dirty if xattr is broken Konstantin Komarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240423064428.8289-7-almaz.alexandrovich@paragon-software.com \
    --to=almaz.alexandrovich@paragon-software.com \
    --cc=dan.carpenter@linaro.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=ntfs3@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.