]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl: fix handling of -q option
authorCherish98 <66007047+Cherish98@users.noreply.github.com>
Wed, 23 Dec 2020 12:59:00 +0000 (12:59 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 23 Dec 2020 15:20:39 +0000 (16:20 +0100)
The match of the "-q" option (short for "--disable") should:
a) allow concatenation with other single-letters; and
b) be case-sensitive, lest confusing with "-Q" ("--quote")

Closes #6364

src/tool_operate.c

index 23dfa635e48ed95dd0bea12e62d59f1af1bc3bc8..9e80ca2e567bfcb99241028afc2f438c817e833a 100644 (file)
@@ -2542,7 +2542,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
 
   /* Parse .curlrc if necessary */
   if((argc == 1) ||
-     (!curl_strequal(first_arg, "-q") &&
+     (strncmp(first_arg, "-q", 2) &&
       !curl_strequal(first_arg, "--disable"))) {
     parseconfig(NULL, global); /* ignore possible failure */