1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-06 01:25:33 -05:00

wolfssl: handle SSL_write() returns 0 for error

Reported-by: Timo Lange

Closes #6967
This commit is contained in:
Daniel Stenberg 2021-04-26 11:11:59 +02:00
parent f154ae9de3
commit 9fc284427c
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -786,7 +786,7 @@ static ssize_t wolfssl_send(struct Curl_easy *data,
int memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len; int memlen = (len > (size_t)INT_MAX) ? INT_MAX : (int)len;
int rc = SSL_write(backend->handle, mem, memlen); int rc = SSL_write(backend->handle, mem, memlen);
if(rc < 0) { if(rc <= 0) {
int err = SSL_get_error(backend->handle, rc); int err = SSL_get_error(backend->handle, rc);
switch(err) { switch(err) {