mirror of
https://github.com/curl/curl.git
synced 2026-05-15 23:26:19 +03:00
schannel: assign result before using it
curl_easy_strerror(result) was called *before* result was assigned. Reported in Joshua's sarif data Closes #18642
This commit is contained in:
parent
82eeda1041
commit
94eec0a788
1 changed files with 2 additions and 2 deletions
|
|
@ -2451,9 +2451,9 @@ static CURLcode schannel_shutdown(struct Curl_cfilter *cf,
|
|||
Curl_pSecFn->FreeContextBuffer(outbuf.pvBuffer);
|
||||
if(!result) {
|
||||
if(written < outbuf.cbBuffer) {
|
||||
result = CURLE_SEND_ERROR;
|
||||
failf(data, "schannel: failed to send close msg: %s"
|
||||
" (bytes written: %zu)", curl_easy_strerror(result), written);
|
||||
result = CURLE_SEND_ERROR;
|
||||
goto out;
|
||||
}
|
||||
backend->sent_shutdown = TRUE;
|
||||
|
|
@ -2466,8 +2466,8 @@ static CURLcode schannel_shutdown(struct Curl_cfilter *cf,
|
|||
}
|
||||
else {
|
||||
if(!backend->recv_connection_closed) {
|
||||
failf(data, "schannel: error sending close msg: %d", result);
|
||||
result = CURLE_SEND_ERROR;
|
||||
failf(data, "schannel: error sending close msg: %d", result);
|
||||
goto out;
|
||||
}
|
||||
/* Looks like server already closed the connection.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue