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: <201001191401.28995.hartleys@visionengravers.com>
Date:	Tue, 19 Jan 2010 14:01:28 -0700
From:	H Hartley Sweeten <hartleys@...ionengravers.com>
To:	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] sysctl_binary.c: use skip_spaces to strip leading whitespace

Use the library function instead of a while loop.

Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>

---

diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
index 8f5d16e..0220e35 100644
--- a/kernel/sysctl_binary.c
+++ b/kernel/sysctl_binary.c
@@ -1001,8 +1001,7 @@ static ssize_t bin_intvec(struct file *file,
 			unsigned long value;
 
 			value = simple_strtoul(str, &str, 10);
-			while (isspace(*str))
-				str++;
+			str = skip_spaces(str);
 			
 			result = -EFAULT;
 			if (put_user(value, vec + i))
@@ -1079,8 +1078,7 @@ static ssize_t bin_ulongvec(struct file *file,
 			unsigned long value;
 
 			value = simple_strtoul(str, &str, 10);
-			while (isspace(*str))
-				str++;
+			str = skip_spaces(str);
 			
 			result = -EFAULT;
 			if (put_user(value, vec + i))
--
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