diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-12-04 23:03:42 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-12-04 23:03:58 +0100 |
| commit | a1d27e57c214f3641b83b5e568d7b3c31c583ed3 (patch) | |
| tree | f1c5837a38205e58cb42e2a36ffe4aecfcee7110 /src | |
| parent | Fix typo bug found by Michael McConville (diff) | |
| download | blind-a1d27e57c214f3641b83b5e568d7b3c31c583ed3.tar.gz blind-a1d27e57c214f3641b83b5e568d7b3c31c583ed3.tar.bz2 blind-a1d27e57c214f3641b83b5e568d7b3c31c583ed3.tar.xz | |
Fix regression bug: the string "0" is an acceptable integer
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src')
| -rw-r--r-- | src/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -37,7 +37,7 @@ tollu(const char *s, unsigned long long int min, unsigned long long int max, uns return -1; } if (!isdigit(s[*s == 'x' || *s == 'X' || *s == '#']) || - (*s == '0' && !isdigit(s[1 + (*s == 'x' || *s == 'o' || *s == 'b')]))) { + (*s == '0' && s[1] && !isdigit(s[1 + (*s == 'x' || *s == 'o' || *s == 'b')]))) { errno = EINVAL; return -1; } |
