X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=parse.c;h=bb138e55f967fbeb6aa09690b79fa4b18092cbb4;hb=2f2e98e639986bdc7aa422d73cc523cb32b725c6;hp=d8061610a8a92563c3701b02e8e7ee305f480ee5;hpb=808def7036ddfaf6f0ec2f5ecce031fd46ce40ef;p=fio.git diff --git a/parse.c b/parse.c index d8061610..bb138e55 100644 --- a/parse.c +++ b/parse.c @@ -79,6 +79,7 @@ static void show_option_help(struct fio_option *o, FILE *out) const char *typehelp[] = { "invalid", "string (opt=bla)", + "string (opt=bla)", "string with possible k/m/g postfix (opt=4k)", "string with time postfix (opt=10s)", "string (opt=bla)", @@ -169,6 +170,9 @@ static unsigned long long get_mult_bytes(const char *str, int len, void *data) { const char *p; + if (len < 2) + return __get_mult_bytes(str, data); + /* * if the last char is 'b' or 'B', the user likely used * "1gb" instead of just "1g". If the second to last is also