/* Provenance: curl/curl config_init (vuln). * repo: curl/curl * commit: abd846c374c5269809ce11740754bc6f00a0b193 * parent: abd846c374c5269809ce11740754bc6f00a0b193 * commit_url: https://github.com/curl/curl/commit/ec9cc725d598ac77de7b6df8afeec292b3c8ad46 * cve: CVE-2020-8284 * license: curl * function: config_init * relpath: src/tool_cfgable.c * provenance: human * mechanism: other */ void config_init(struct OperationConfig *config) { memset(config, 0, sizeof(struct OperationConfig)); config->postfieldsize = -1; config->use_httpget = FALSE; config->create_dirs = FALSE; config->maxredirs = DEFAULT_MAXREDIRS; config->proto = CURLPROTO_ALL; config->proto_present = FALSE; config->proto_redir = CURLPROTO_ALL & /* All except FILE, SCP and SMB */ ~(CURLPROTO_FILE | CURLPROTO_SCP | CURLPROTO_SMB | CURLPROTO_SMBS); config->proto_redir_present = FALSE; config->proto_default = NULL; config->tcp_nodelay = TRUE; /* enabled by default */ config->happy_eyeballs_timeout_ms = CURL_HET_DEFAULT; config->http09_allowed = FALSE; }