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:
parent
f154ae9de3
commit
9fc284427c
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user