mirror of
https://github.com/curl/curl.git
synced 2024-12-15 06:40:09 +08:00
tool_operate: avoid NULL dereference of first_arg
Follow-up to 6a5e020d4d
Identified by OSS-Fuzz
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28999
Closes #6377
This commit is contained in:
parent
8ab78f720a
commit
e6c5613ea8
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user