mirror of
https://github.com/curl/curl.git
synced 2026-07-24 14:27:16 +03:00
curl: make #0 not output the full URL
It was not intended nor documented! Added test 1176 to verify. Reported-by: vshmuk on hackerone Closes #4812
This commit is contained in:
parent
6773c7ca65
commit
4431ed2484
3 changed files with 71 additions and 3 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue