mirror of
https://github.com/curl/curl.git
synced 2026-07-16 03:37:16 +03:00
mqtt: clear the leftovers pointer when sending succeeds
CVE-2021-22945 Bug: https://curl.se/docs/CVE-2021-22945.html
This commit is contained in:
parent
409a441240
commit
43157490a5
1 changed files with 4 additions and 0 deletions
|
|
@ -128,6 +128,10 @@ static CURLcode mqtt_send(struct Curl_easy *data,
|
|||
mq->sendleftovers = sendleftovers;
|
||||
mq->nsend = nsend;
|
||||
}
|
||||
else {
|
||||
mq->sendleftovers = NULL;
|
||||
mq->nsend = 0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue