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: <20210319230554.11991-1-olaf@aepfle.de>
Date:   Sat, 20 Mar 2021 00:05:53 +0100
From:   Olaf Hering <olaf@...fle.de>
To:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Olaf Hering <olaf@...fle.de>,
        Alexander Viro <viro@...iv.linux.org.uk>
Subject: [PATCH v1] binfmt: check return value of remove_arg_zero

In preparation to build with -Werror=unused-result, use remove_arg_zero properly.

Fixes commit b6a2fea39318e43fee84fa7b0b90d68bed92d2ba

Signed-off-by: Olaf Hering <olaf@...fle.de>
---
 fs/binfmt_em86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/binfmt_em86.c b/fs/binfmt_em86.c
index 06b9b9fddf70..5b1c02a0250f 100644
--- a/fs/binfmt_em86.c
+++ b/fs/binfmt_em86.c
@@ -63,7 +63,8 @@ static int load_em86(struct linux_binprm *bprm)
 	 * This is done in reverse order, because of how the
 	 * user environment and arguments are stored.
 	 */
-	remove_arg_zero(bprm);
+	retval = remove_arg_zero(bprm);
+	if (retval < 0) return retval; 
 	retval = copy_string_kernel(bprm->filename, bprm);
 	if (retval < 0) return retval; 
 	bprm->argc++;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ