mirror of
https://github.com/curl/curl.git
synced 2025-09-17 17:42:49 +03: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);
|
fprintf(global->errors, "curl: (%d) Failed writing body\n", result);
|
||||||
}
|
}
|
||||||
if(result && config->rm_partial) {
|
if(result && config->rm_partial) {
|
||||||
notef(global, "Removing output file: %s", per->outfile);
|
notef(global, "Removing output file: %s\n", outs->filename);
|
||||||
unlink(per->outfile);
|
unlink(outs->filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user