Curl_easy: remember last connection by id, not by pointer

CVE-2020-8231

Bug: https://curl.haxx.se/docs/CVE-2020-8231.html

Reported-by: Marc Aldorasi
Closes #5824
This commit is contained in:
Daniel Stenberg 2020-08-16 11:34:35 +02:00
parent 687908c6e6
commit 3c9e021f86
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 18 additions and 17 deletions

View file

@ -630,7 +630,7 @@ CURLcode Curl_open(struct Curl_easy **curl)
Curl_initinfo(data);
/* most recent connection is not yet defined */
data->state.lastconnect = NULL;
data->state.lastconnect_id = -1;
data->progress.flags |= PGRS_HIDE;
data->state.current_speed = -1; /* init to negative == impossible */