2d49a208f8ad9d1c4e79fa4302451e35d06de707 |
|
10-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
parse-util: really refuse parsing negative values as positive ones, even on x86-32
strtoull() doesn't make it particularly easy to detect passed-in
negative numbers, as it silently converts them to positive ones without
generating any error. Since we are not interested in negative values we
should hence explicitly filter them out by looking at the string
directly and returning ERANGE if we see a leading "-".
Fixes: #1829 |