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: <1467223386-23650-1-git-send-email-luisbg@osg.samsung.com>
Date:	Wed, 29 Jun 2016 19:03:06 +0100
From:	Luis de Bethencourt <luisbg@....samsung.com>
To:	linux-kernel@...r.kernel.org
Cc:	akpm@...ux-foundation.org, salah.triki@...il.com,
	viro@...iv.linux.org.uk, mhocko@...e.com, vdavydov@...tuozzo.com,
	Luis de Bethencourt <luisbg@....samsung.com>
Subject: [PATCH] fs: befs: remove ignored length of buffer

When befs_nls2utf() returns an error, the caller ignores the length of the
output buffer since it knows the buffer isn't useful. Removing the
length assignment that will be ignored.

Signed-off-by: Luis de Bethencourt <luisbg@....samsung.com>
---

Hi,

Noticed this while continuing to familiarize with the befs code.

As a matter of fact, the only caller of befs_nls2utf() ignores the value of
out_len even when the function succeeds. I was considering that this parameter
could be removed completely.

The only con to doing so I can think of is losing the symmetry with the
matching befs_utf2nls(). Which is why I am asking here before proposing that
patch.

Thanks,
Luis


 fs/befs/linuxvfs.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 06d29a3..5c99012 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -614,7 +614,6 @@ befs_nls2utf(struct super_block *sb, const char *in,
 
 	*out = result = kmalloc(maxlen, GFP_NOFS);
 	if (!*out) {
-		*out_len = 0;
 		return -ENOMEM;
 	}
 
-- 
2.5.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ