aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_urlglob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
index 450cdcf32..6c8716104 100644
--- a/src/tool_urlglob.c
+++ b/src/tool_urlglob.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -627,7 +627,7 @@ CURLcode glob_match_url(char **result, char *filename, URLGlob *glob)
unsigned long num = strtoul(&filename[1], &filename, 10);
URLPattern *pat = NULL;
- if(num < glob->size) {
+ if(num && (num < glob->size)) {
unsigned long i;
num--; /* make it zero based */
/* find the correct glob entry */