Sun, 24 Feb 2019 15:06:25 +0100
fixed TODO: use strtol
dav/main.c | file | annotate | diff | comparison | revisions |
--- a/dav/main.c Sun Feb 24 14:55:59 2019 +0100 +++ b/dav/main.c Sun Feb 24 15:06:25 2019 +0100 @@ -1998,7 +1998,13 @@ if(!sstrcasecmp(sstr(timeoutstr), S("infinite"))) { timeout = -1; } else { - timeout = (time_t)atoi(timeoutstr); // TODO: use strtol + uint64_t i; + if(util_strtoint(timeoutstr)) { + timeout = (time_t)i; + } else { + fprintf(stderr, "Error: -T option has invalid value\n"); + return -1; + } } }