mirror of
https://github.com/curl/curl.git
synced 2026-08-25 04:43:33 +03:00
curl: fix segmentation fault for empty output file names.
Function glob_match_url set *result to NULL when called with filename = "", producing an indirect NULL pointer dereference. Closes #8606
This commit is contained in:
parent
a6c3b7d6f5
commit
9e5bd9ba19
3 changed files with 13 additions and 1 deletions
|
|
@ -1020,6 +1020,11 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
|||
warnf(global, "bad output glob!\n");
|
||||
break;
|
||||
}
|
||||
if(!*per->outfile) {
|
||||
warnf(global, "output glob produces empty string!\n");
|
||||
result = CURLE_WRITE_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(config->output_dir && *config->output_dir) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue