]> granicus.if.org Git - curl/commitdiff
tool_urlglob: Allow reserved dos device names (Windows)
authorJay Satiro <raysatiro@yahoo.com>
Mon, 8 Feb 2016 20:09:42 +0000 (15:09 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Mon, 8 Feb 2016 20:09:42 +0000 (15:09 -0500)
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
src/tool_urlglob.c

index 39cb32d6c61772207eb98ab2b7a5158e098f6794..f1dd27fad064267fb32b0de10cbc86620d732b03 100644 (file)
@@ -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;