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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1421781180-24425-3-git-send-email-zohar@linux.vnet.ibm.com>
Date:	Tue, 20 Jan 2015 14:12:51 -0500
From:	Mimi Zohar <zohar@...ux.vnet.ibm.com>
To:	initramfs <initramfs@...r.kernel.org>
Cc:	Mimi Zohar <zohar@...ux.vnet.ibm.com>,
	Al Viro <viro@...IV.linux.org.uk>,
	linux-ima-devel@...ts.sourceforge.net,
	linux-security-module <linux-security-module@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH v1 02/11] initramfs: replace simple_strtoul() with kstrtoul()

Replace existing obsolete simple_strtoul() call with kstrtoul(),
before making other changes.

Signed-off-by: Mimi Zohar <zohar@...ux.vnet.ibm.com>
---
 init/initramfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index bb51b5b..5dd93ca 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -163,12 +163,15 @@ static void __init parse_header(char *s)
 {
 	unsigned long parsed[12];
 	char buf[9];
+	int ret;
 	int i;
 
 	buf[8] = '\0';
 	for (i = 0, s += 6; i < 12; i++, s += 8) {
 		memcpy(buf, s, 8);
-		parsed[i] = simple_strtoul(buf, NULL, 16);
+		ret = kstrtoul(buf, 16, &parsed[i]);
+		if (ret)
+			pr_err("invalid cpio header field (%d)", ret);
 	}
 	ino = parsed[0];
 	mode = parsed[1];
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ