mirror of
https://github.com/curl/curl.git
synced 2026-05-16 18:56:21 +03:00
tool_urlglob: check glob use before access
As this function can now be invoked with only the second glob "active",
it must avoid accessing the first one if not in use.
Follow-up to 2238f0921c
Spotted by Codex Security
Closes #21586
This commit is contained in:
parent
2238f0921c
commit
b2476a0712
1 changed files with 1 additions and 1 deletions
|
|
@ -716,7 +716,7 @@ CURLcode glob_match_url(char **output, const char *filename,
|
|||
while(*filename) {
|
||||
CURLcode result = CURLE_OK;
|
||||
struct URLPattern *pat = NULL;
|
||||
if(*filename == '#' && ISDIGIT(filename[1])) {
|
||||
if(glob_inuse(glob) && *filename == '#' && ISDIGIT(filename[1])) {
|
||||
/* a numbered glob reference */
|
||||
const char *ptr = filename++;
|
||||
curl_off_t num;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue