diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-10 21:03:30 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-10 21:03:30 -0500 |
commit | f45ac22ae2b8fc5b4c32d9b8d17ea419a8701d89 (patch) | |
tree | 8e05bccd7b85fc3dd2fbd33ec3286de27e152819 /lib/vsprintf.c | |
parent | 79f3b3cb7a2586b319a43a7f29924c6c555e4357 (diff) | |
parent | c59765042f53a79a7a65585042ff463b69cb248c (diff) |
Merge commit 'v2.6.29-rc1' into x86/urgent
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r-- | lib/vsprintf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 98d632277ca8..0fbd0121d91d 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c | |||
@@ -170,6 +170,8 @@ int strict_strtoul(const char *cp, unsigned int base, unsigned long *res) | |||
170 | return -EINVAL; | 170 | return -EINVAL; |
171 | 171 | ||
172 | val = simple_strtoul(cp, &tail, base); | 172 | val = simple_strtoul(cp, &tail, base); |
173 | if (tail == cp) | ||
174 | return -EINVAL; | ||
173 | if ((*tail == '\0') || | 175 | if ((*tail == '\0') || |
174 | ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) { | 176 | ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) { |
175 | *res = val; | 177 | *res = val; |
@@ -241,6 +243,8 @@ int strict_strtoull(const char *cp, unsigned int base, unsigned long long *res) | |||
241 | return -EINVAL; | 243 | return -EINVAL; |
242 | 244 | ||
243 | val = simple_strtoull(cp, &tail, base); | 245 | val = simple_strtoull(cp, &tail, base); |
246 | if (tail == cp) | ||
247 | return -EINVAL; | ||
244 | if ((*tail == '\0') || | 248 | if ((*tail == '\0') || |
245 | ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) { | 249 | ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) { |
246 | *res = val; | 250 | *res = val; |