Dave Voutila writes:

> CVSROOT:      /cvs
> Module name:  src
> Changes by:   [email protected]    2021/04/21 12:27:36
>
> Modified files:
>       usr.sbin/vmd   : virtio.c virtio.h
>
> Log message:
> Fix packet size checks and remove bad casts.
>
> Because dhcpsz was an uninitialized ssize_t, it was possible that a
> garbage "packet" would be queued on the receiving end of the virtio
> network device.
>
> Change the type to size_t and add proper checks based on it being
> greater than zero. Remove the cast of ssize_t to uint64_t that also
> caused garbage sizes when dhcpsz was unintialized and set at runtime
> to something < 0.

Forgot say: ok mlarkin@

Reply via email to