summaryrefslogtreecommitdiff
path: root/netio.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-03-20 23:33:45 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-03-20 23:33:45 +0800
commit1d23c9f31363ac8195733e40d45e4b7fa78140c3 (patch)
tree15225c1c06c6f5b44a391624c2b04adc48aa004c /netio.c
parent6d3cac0a12b8c7244b03f2838790998abc4ecca9 (diff)
downloaddropbear-1d23c9f31363ac8195733e40d45e4b7fa78140c3.tar.gz
Fix when iov queue is large
Diffstat (limited to 'netio.c')
-rw-r--r--netio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/netio.c b/netio.c
index 0837e06..2741de2 100644
--- a/netio.c
+++ b/netio.c
@@ -273,7 +273,7 @@ void packet_queue_to_iovec(struct Queue *queue, struct iovec *iov, unsigned int
*iov_count = MIN(MIN(queue->count, IOV_MAX), *iov_count);
- for (l = queue->head, i = 0; l; l = l->link, i++)
+ for (l = queue->head, i = 0; i < *iov_count; l = l->link, i++)
{
writebuf = (buffer*)l->item;
len = writebuf->len - 1 - writebuf->pos;