diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-12-26 16:20:54 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-12-26 23:46:14 +0100 |
commit | e6c5613ea88b5587b3b8602c1f20c80f00f40fe5 (patch) | |
tree | f589316b8869c67042ada0edb9535bb82e7ebab1 /src/tool_operate.c | |
parent | 8ab78f720ae478d533e30b202baec4b451741579 (diff) | |
download | curl-e6c5613ea88b5587b3b8602c1f20c80f00f40fe5.tar.gz |
tool_operate: avoid NULL dereference of first_arg
Follow-up to 6a5e020d4d2b04a
Identified by OSS-Fuzz
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28999
Closes #6377
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r-- | src/tool_operate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 5635483d1..15e82b4bd 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -2539,7 +2539,7 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[]) /* Parse .curlrc if necessary */ if((argc == 1) || - (strncmp(first_arg, "-q", 2) && + (first_arg && strncmp(first_arg, "-q", 2) && !curl_strequal(first_arg, "--disable"))) { parseconfig(NULL, global); /* ignore possible failure */ |