From: Denys Vlasenko Date: Wed, 2 Jun 2010 23:47:04 +0000 (+0200) Subject: test: "" is not a valid number. Closes bug 1915 X-Git-Tag: 1_17_0~126 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3e47cfec90fbe358692b3b960f7fa2303e465c2f;p=oweals%2Fbusybox.git test: "" is not a valid number. Closes bug 1915 Signed-off-by: Denys Vlasenko --- 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;