← Commit list

3ab3d8a5c

Denis Vlasenko
Denis Vlasenko
2008-10-18
FAILED Duration: 31s

Subject

libbb: do not reject floating point strings like ".15"

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/bb_strtod.c+2 -1
@@ -17,7 +17,8 @@ double FAST_FUNC bb_strtod(const char *arg, char **endp)
double v;
char *endptr;
- if (arg[0] != '-' && NOT_DIGIT(arg[0]))
+ /* Allow .NN form. People want to use "sleep .15" etc */
+ if (arg[0] != '-' && arg[0] != '.' && NOT_DIGIT(arg[0]))
goto err;
errno = 0;
v = strtod(arg, &endptr);