For what it's worth, your diff reads fine to me. It took me a while to
realize, that tlen in pppxwrite() and tun_dev_write() can't overflow
because of the range check beforehand, but on close look that code also
turns out to be correct.
cheers,
natano
On Fri, Jan 22, 2016 at 07:29:54PM +0100, St
The following diff prevents integer truncation of uio_resid
by using ulmin() instead of min() and calls uiomove() instead
of the legacy uiomove().
That's straightforward because the m_len mbuf field is unsigned.
mlen can be turned to a size_t because it's set to MLEN or MCLBYTES,
which is > 0.
I