Mercurial > dropbear
diff packet.c @ 1641:a2bbc22ea1e6 coverity
merge coverity
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 21 Mar 2019 00:14:38 +0800 |
parents | c4bf28ccab97 |
children | 3a97f14c0235 |
line wrap: on
line diff
--- a/packet.c Wed Mar 21 00:52:02 2018 +0800 +++ b/packet.c Thu Mar 21 00:14:38 2019 +0800 @@ -58,7 +58,7 @@ void write_packet() { ssize_t written; -#ifdef HAVE_WRITEV +#if defined(HAVE_WRITEV) && (defined(IOV_MAX) || defined(UIO_MAXIOV)) /* 50 is somewhat arbitrary */ unsigned int iov_count = 50; struct iovec iov[50]; @@ -110,8 +110,6 @@ /* Get the next buffer in the queue of encrypted packets to write*/ writebuf = (buffer*)examine(&ses.writequeue); - /* The last byte of the buffer is not to be transmitted, but is - * a cleartext packet_type indicator */ len = writebuf->len - writebuf->pos; dropbear_assert(len > 0); /* Try to write as much as possible */