mirror of
https://github.com/curl/curl.git
synced 2024-12-15 06:40:09 +08:00
post_per_transfer: remove the updated file name
When --remove-on-error is used with --no-clobber, it might have an updated file name to remove. Bug: https://curl.se/docs/CVE-2022-27778.html CVE-2022-27778 Reported-by: Harry Sintonen Closes #8824
This commit is contained in:
parent
fae6fea209
commit
8c7ee9083d
@ -596,8 +596,8 @@ static CURLcode post_per_transfer(struct GlobalConfig *global,
|
||||
fprintf(global->errors, "curl: (%d) Failed writing body\n", result);
|
||||
}
|
||||
if(result && config->rm_partial) {
|
||||
notef(global, "Removing output file: %s", per->outfile);
|
||||
unlink(per->outfile);
|
||||
notef(global, "Removing output file: %s\n", outs->filename);
|
||||
unlink(outs->filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user