Fix bad logic in iovlist_truncate().
authored <ed@FreeBSD.org>
Mon, 18 Jun 2018 06:01:28 +0000 (06:01 +0000)
committered <ed@FreeBSD.org>
Mon, 18 Jun 2018 06:01:28 +0000 (06:01 +0000)
commit912be993551f5ea812e8934f4def0f278235b80e
tree3d745f19d1708fdf48753b2353122cc0059c4cce
parentd5977ae2f0e7a67767cdc103ed4bf723bc60f684
Fix bad logic in iovlist_truncate().

To conform to RFC 5426, this function is intended to truncate messages
if they exceed the message size limits. Unfortunately, the amount of
space was computed the wrong way around, causing messages to be
truncated entirely.

Reported by: Michael Grimm on stable@
MFC after: 3 days
usr.sbin/syslogd/syslogd.c