Improved parsing of some integer arguments (sizes).

This commit is contained in:
Thomas Pornin 2016-11-12 15:23:43 +01:00
parent 9dc3c9b61d
commit 0d974e1c9c
4 changed files with 75 additions and 3 deletions

View file

@ -245,7 +245,11 @@ do_client(int argc, char *argv[])
usage_client();
goto client_exit_error;
}
iobuf_len = strtoul(arg, 0, 10);
iobuf_len = parse_size(arg);
if (iobuf_len == (size_t)-1) {
usage_client();
goto client_exit_error;
}
} else if (eqstr(arg, "-CA")) {
if (++ i >= argc) {
fprintf(stderr,