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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250313164615305U0u1TXBAUsEnpGZQjtOS-@zte.com.cn>
Date: Thu, 13 Mar 2025 16:46:15 +0800 (CST)
From: <ye.xingchen@....com.cn>
To: <brauner@...nel.org>
Cc: <jeff.johnson@....qualcomm.com>, <jack@...e.cz>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH] nls: Fix utf8_to_utf32 parameter type in declaration and definition

From: YeXingchen <ye.xingchen@....com.cn>

The declaration of utf8_to_utf32 in the header file uses
int len as the parameter type, while the definition uses int inlen.

This patch aligns the parameter name in the definition with the
declaration,changing inlen to len to ensure consistency.

Signed-off-by: YeXingchen <ye.xingchen@....com.cn>
---
 fs/nls/nls_base.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
index 18d597e49a19..59989205f1b5 100644
--- a/fs/nls/nls_base.c
+++ b/fs/nls/nls_base.c
@@ -52,7 +52,7 @@ static const struct utf8_table utf8_table[] =
 #define SURROGATE_LOW	0x00000400
 #define SURROGATE_BITS	0x000003ff

-int utf8_to_utf32(const u8 *s, int inlen, unicode_t *pu)
+int utf8_to_utf32(const u8 *s, int len, unicode_t *pu)
 {
 	unsigned long l;
 	int c0, c, nc;
@@ -71,7 +71,7 @@ int utf8_to_utf32(const u8 *s, int inlen, unicode_t *pu)
 			*pu = (unicode_t) l;
 			return nc;
 		}
-		if (inlen <= nc)
+		if (len <= nc)
 			return -1;
 		s++;
 		c = (*s ^ 0x80) & 0xFF;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ