From 9fc284427c96cc2e89c51f79080f16c44a10594d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Apr 2021 11:11:59 +0200 Subject: [PATCH] wolfssl: handle SSL_write() returns 0 for error Reported-by: Timo Lange Closes #6967 --- lib/vtls/wolfssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vtls/wolfssl.c b/lib/vtls/wolfssl.c index a0afe7418..a16612015 100644 --- a/lib/vtls/wolfssl.c +++ b/lib/vtls/wolfssl.c @@ -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 rc = SSL_write(backend->handle, mem, memlen); - if(rc < 0) { + if(rc <= 0) { int err = SSL_get_error(backend->handle, rc); switch(err) {