mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-19 13:10:03 +00:00
Tasks 3.3 and 4.1. - vfc curl and openssl-cve-2021-3449 excerpts re-harvested through the shared library: whole functions with upstream_start headers, the vendored key redacted code-safely, no truncated bodies. - vfc/recipes.toml carries mode, fix_path and function anchors; training/manifest.jsonl regenerated. - Juliet CWE-121 strcpy pair gets its buffer declarations back so the vulnerable side is a real overflow again. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01T7XD7x5KonMdmGRkp63EQG
57 lines
1.9 KiB
C
57 lines
1.9 KiB
C
/* Provenance: curl/curl conn_free (fixed).
|
|
* repo: curl/curl
|
|
* commit: 852aa5ad351ea53e5f01d2f44b5b4370c2bf5425
|
|
* parent: ff2f3e836702daa82e2356195482fcc95f4257dc
|
|
* commit_url: https://github.com/curl/curl/commit/852aa5ad351ea53e5f01d2f44b5b4370c2bf5425
|
|
* cve: CVE-2022-22576
|
|
* license: curl
|
|
* function: conn_free
|
|
* relpath: lib/url.c
|
|
* provenance: human
|
|
* mechanism: other
|
|
*/
|
|
|
|
static void conn_free(struct connectdata *conn)
|
|
{
|
|
DEBUGASSERT(conn);
|
|
|
|
Curl_free_idnconverted_hostname(&conn->host);
|
|
Curl_free_idnconverted_hostname(&conn->conn_to_host);
|
|
#ifndef CURL_DISABLE_PROXY
|
|
Curl_free_idnconverted_hostname(&conn->http_proxy.host);
|
|
Curl_free_idnconverted_hostname(&conn->socks_proxy.host);
|
|
Curl_safefree(conn->http_proxy.user);
|
|
Curl_safefree(conn->socks_proxy.user);
|
|
Curl_safefree(conn->http_proxy.passwd);
|
|
Curl_safefree(conn->socks_proxy.passwd);
|
|
Curl_safefree(conn->http_proxy.host.rawalloc); /* http proxy name buffer */
|
|
Curl_safefree(conn->socks_proxy.host.rawalloc); /* socks proxy name buffer */
|
|
Curl_free_primary_ssl_config(&conn->proxy_ssl_config);
|
|
#endif
|
|
Curl_safefree(conn->user);
|
|
Curl_safefree(conn->passwd);
|
|
Curl_safefree(conn->sasl_authzid);
|
|
Curl_safefree(conn->options);
|
|
Curl_safefree(conn->oauth_bearer);
|
|
Curl_dyn_free(&conn->trailer);
|
|
Curl_safefree(conn->host.rawalloc); /* host name buffer */
|
|
Curl_safefree(conn->conn_to_host.rawalloc); /* host name buffer */
|
|
Curl_safefree(conn->hostname_resolve);
|
|
Curl_safefree(conn->secondaryhostname);
|
|
Curl_safefree(conn->connect_state);
|
|
|
|
conn_reset_all_postponed_data(conn);
|
|
Curl_llist_destroy(&conn->easyq, NULL);
|
|
Curl_safefree(conn->localdev);
|
|
Curl_free_primary_ssl_config(&conn->ssl_config);
|
|
|
|
#ifdef USE_UNIX_SOCKETS
|
|
Curl_safefree(conn->unix_domain_socket);
|
|
#endif
|
|
|
|
#ifdef USE_SSL
|
|
Curl_safefree(conn->ssl_extra);
|
|
#endif
|
|
free(conn); /* free all the connection oriented data */
|
|
}
|