]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
wolfssl: handle SSL_write() returns 0 for error
authorDaniel Stenberg <daniel@haxx.se>
Mon, 26 Apr 2021 09:11:59 +0000 (11:11 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 26 Apr 2021 12:27:45 +0000 (14:27 +0200)
Reported-by: Timo Lange
Closes #6967

lib/vtls/wolfssl.c

index a0afe741840caac6887e08aa7f4726530ac0d26b..a16612015a2e1fd6b5ed32cb33a8e5dd1d8f0c6a 100644 (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 rc = SSL_write(backend->handle, mem, memlen);
 
-  if(rc < 0) {
+  if(rc <= 0) {
     int err = SSL_get_error(backend->handle, rc);
 
     switch(err) {