lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241209025242.2995-1-zhujun2@cmss.chinamobile.com>
Date: Sun,  8 Dec 2024 18:52:42 -0800
From: Zhu Jun <zhujun2@...s.chinamobile.com>
To: dlemoal@...nel.org
Cc: linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	zhujun2@...s.chinamobile.com
Subject: [PATCH v2] zonefs: Fix the wrong format specifier

Change f to unsigned int to resolve the mismatch in format specifiers for
snprintf(), where %u should be used for unsigned integers instead of %d

Signed-off-by: Zhu Jun <zhujun2@...s.chinamobile.com>
---
Changes:
v2:
A better fix is to make f "unsigned int" as that is consistent with
g_nr_zones and the fact that up to "unsigned int" total number of zones are
allowed for a zoned device.

Can you send a v2 ? Also please add a Fixes tag.

 fs/zonefs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index faf1eb878..695da258a 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -791,7 +791,7 @@ static int zonefs_readdir_zgroup(struct file *file,
 	int fname_len;
 	char *fname;
 	ino_t ino;
-	int f;
+	unsigned int f;
 
 	/*
 	 * The size of zone group directories is equal to the number
-- 
2.17.1




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ