aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-03 01:47:04 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-03 01:47:04 +0200
commit3e47cfec90fbe358692b3b960f7fa2303e465c2f (patch)
tree5cbeb396732bd35f930bfed83cb1ba4469192a2a
parent26b6ccf340243ec3acd594c6928b18e95d3deea9 (diff)
downloadbusybox-3e47cfec90fbe358692b3b960f7fa2303e465c2f.tar.gz
test: "" is not a valid number. Closes bug 1915
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--coreutils/test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/test.c b/coreutils/test.c
index 5864c7f32..a1d164574 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -393,7 +393,7 @@ static number_t getn(const char *s)
if (errno != 0)
syntax(s, "out of range");
- if (*(skip_whitespace(p)))
+ if (p == s || *(skip_whitespace(p)) != '\0')
syntax(s, "bad number");
return r;