curl: avoid local drive traversal when saving file (Windows)

curl does not sanitize colons in a remote file name that is used as the
local file name. This may lead to a vulnerability on systems where the
colon is a special path character. Currently Windows/DOS is the only OS
where this vulnerability applies.

CVE-2016-0754

Bug: http://curl.haxx.se/docs/adv_20160127B.html
This commit is contained in:
Ray Satiro 2016-01-26 23:23:15 +01:00 committed by Daniel Stenberg
parent cea1fd7a94
commit 3017d8a8d8
4 changed files with 187 additions and 58 deletions

View file

@ -25,7 +25,7 @@
#if defined(MSDOS) || defined(WIN32)
char *sanitize_dos_name(char *file_name);
CURLcode sanitize_file_name(char **filename);
#if defined(MSDOS) && (defined(__DJGPP__) || defined(__GO32__))