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
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);
}
}