From: Jay Satiro Date: Mon, 8 Feb 2016 20:09:42 +0000 (-0500) Subject: tool_urlglob: Allow reserved dos device names (Windows) X-Git-Tag: curl-7_48_0~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c3aac489195526c23190fcfe4ce63cbe49ea00e6;p=curl tool_urlglob: Allow reserved dos device names (Windows) Allow --output to reserved dos device names without the device prefix for backwards compatibility. Example: --output NUL can be used instead of --output \\.\NUL Bug: https://github.com/curl/curl/commit/4520534#commitcomment-15954863 Reported-by: Gisle Vanem --- diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c index 39cb32d6c..f1dd27fad 100644 --- a/src/tool_urlglob.c +++ b/src/tool_urlglob.c @@ -673,7 +673,8 @@ CURLcode glob_match_url(char **result, char *filename, URLGlob *glob) { char *sanitized; SANITIZEcode sc = sanitize_file_name(&sanitized, target, - SANITIZE_ALLOW_PATH); + (SANITIZE_ALLOW_PATH | + SANITIZE_ALLOW_RESERVED)); Curl_safefree(target); if(sc) return CURLE_URL_MALFORMAT;