1
1
Files
zyxel-vmg8825_b50b-cfw/package/network/utils/curl/patches_7.65.3/204-CVE-2020-8177.patch
T
2026-04-17 18:33:03 +02:00

51 lines
1.8 KiB
Diff

Index: curl-7.65.3/src/tool_cb_hdr.c
===================================================================
--- curl-7.65.3.orig/src/tool_cb_hdr.c 2019-07-16 05:20:59.000000000 +0800
+++ curl-7.65.3/src/tool_cb_hdr.c 2021-01-07 16:51:21.330738736 +0800
@@ -132,25 +132,11 @@
filename = parse_filename(p, len);
if(filename) {
if(outs->stream) {
- int rc;
- /* already opened and possibly written to */
- if(outs->fopened)
- fclose(outs->stream);
- outs->stream = NULL;
-
- /* rename the initial file name to the new file name */
- rc = rename(outs->filename, filename);
- if(rc != 0) {
- warnf(outs->config->global, "Failed to rename %s -> %s: %s\n",
- outs->filename, filename, strerror(errno));
- }
- if(outs->alloc_filename)
- Curl_safefree(outs->filename);
- if(rc != 0) {
- free(filename);
- return failure;
- }
+ /* indication of problem, get out! */
+ free(filename);
+ return failure;
}
+
outs->is_cd_filename = TRUE;
outs->s_isreg = TRUE;
outs->fopened = FALSE;
Index: curl-7.65.3/src/tool_getparam.c
===================================================================
--- curl-7.65.3.orig/src/tool_getparam.c 2019-07-16 18:14:37.000000000 +0800
+++ curl-7.65.3/src/tool_getparam.c 2021-01-07 16:52:34.538738736 +0800
@@ -1772,6 +1772,11 @@
}
break;
case 'i':
+ if(config->content_disposition) {
+ warnf(global,
+ "--include and --remote-header-name cannot be combined.\n");
+ return PARAM_BAD_USE;
+ }
config->show_headers = toggle; /* show the headers as well in the
general output stream */
break;