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

@ -838,8 +838,7 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
/* the connection cache is setup on demand */
outcurl->state.conn_cache = NULL;
outcurl->state.lastconnect = NULL;
outcurl->state.lastconnect_id = -1;
outcurl->progress.flags = data->progress.flags;
outcurl->progress.callback = data->progress.callback;