From c85c2b7be7c3786b172d4f619bfeb5e0e90980fb Mon Sep 17 00:00:00 2001 From: Petar Popovic Date: Mon, 4 Aug 2025 19:48:26 +0200 Subject: [PATCH] tool_paramhlp: fix secs2ms() - remove one zero from digs[5] - remove size of size Closes #18167 --- src/tool_paramhlp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c index 4c7c5a7906..43b5bee455 100644 --- a/src/tool_paramhlp.c +++ b/src/tool_paramhlp.c @@ -321,7 +321,7 @@ ParameterError secs2ms(long *valp, const char *str) { curl_off_t secs; long ms = 0; - const unsigned int digs[] = { 1, 10, 100, 1000, 10000, 1000000, + const unsigned int digs[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000 }; if(!str || curlx_str_number(&str, &secs, LONG_MAX/1000 - 1)) @@ -334,7 +334,7 @@ ParameterError secs2ms(long *valp, const char *str) return PARAM_NUMBER_TOO_LARGE; /* how many milliseconds are in fracs ? */ len = (str - s); - while((len > sizeof(CURL_ARRAYSIZE(digs)) || (fracs > LONG_MAX/100))) { + while((len > CURL_ARRAYSIZE(digs) || (fracs > LONG_MAX/100))) { fracs /= 10; len--; } -- 2.47.2