Fix a segfault when writing a very fragmented evbuffer onto an SSL

Fixes bug 2916328.
This commit is contained in:
Joachim Bauch 2009-12-17 12:38:46 -05:00 committed by Nick Mathewson
parent f6430ac1e3
commit a6adeca72c

View File

@ -590,6 +590,8 @@ do_write(struct bufferevent_openssl *bev_ssl, int atmost)
if (n < 0)
return -1;
if (n > 8)
n = 8;
for (i=0; i < n; ++i) {
r = SSL_write(bev_ssl->ssl, space[i].iov_base,
space[i].iov_len);