parse: improve detection of bad input string
authorJens Axboe <axboe@kernel.dk>
Mon, 14 Oct 2019 14:03:53 +0000 (08:03 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 14 Oct 2019 14:03:53 +0000 (08:03 -0600)
commit5cd4efe903798f2185a347911a9440324558c89f
treed3039ba213b01fe3c9347c2d202db751c5c8061e
parent9663e751c25d3bf52e959d8c9025460d2f645b1e
parse: improve detection of bad input string

If we attempt to do number conversion, and strtoll() returns 0 AND
the end pointer is the same as the starting string, then fail the
conversion.

Fixes: https://github.com/axboe/fio/issues/841
Signed-off-by: Jens Axboe <axboe@kernel.dk>
parse.c