Commit 1e7fa834b5232612693cd0c3e9d7a075392028d7

Edward Thomson 2016-04-28T22:32:20

Merge pull request #3760 from backhub/bug/openssl_read Fix return value of openssl_read (infinite loop)

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/openssl_stream.c b/src/openssl_stream.c
index edea8fe..b8ab21f 100644
--- a/src/openssl_stream.c
+++ b/src/openssl_stream.c
@@ -523,7 +523,7 @@ ssize_t openssl_read(git_stream *stream, void *data, size_t len)
 	int ret;
 
 	if ((ret = SSL_read(st->ssl, data, len)) <= 0)
-		ssl_set_error(st->ssl, ret);
+		return ssl_set_error(st->ssl, ret);
 
 	return ret;
 }