mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 21:10:06 -04:00
Fix a segfault when writing a very fragmented evbuffer onto an SSL
Fixes bug 2916328.
This commit is contained in:
parent
f6430ac1e3
commit
a6adeca72c
@ -590,6 +590,8 @@ do_write(struct bufferevent_openssl *bev_ssl, int atmost)
|
|||||||
if (n < 0)
|
if (n < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (n > 8)
|
||||||
|
n = 8;
|
||||||
for (i=0; i < n; ++i) {
|
for (i=0; i < n; ++i) {
|
||||||
r = SSL_write(bev_ssl->ssl, space[i].iov_base,
|
r = SSL_write(bev_ssl->ssl, space[i].iov_base,
|
||||||
space[i].iov_len);
|
space[i].iov_len);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user