aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_urlglob.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
index 6b1ece008..d56dcd912 100644
--- a/src/tool_urlglob.c
+++ b/src/tool_urlglob.c
@@ -273,7 +273,10 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
}
errno = 0;
max_n = strtoul(pattern, &endp, 10);
- if(errno || (*endp == ':')) {
+ if(errno)
+ /* overflow */
+ endp = NULL;
+ else if(*endp == ':') {
pattern = endp+1;
errno = 0;
step_n = strtoul(pattern, &endp, 10);