diff options
author | dv <dv@cvs.openbsd.org> | 2021-04-21 18:27:37 +0000 |
---|---|---|
committer | dv <dv@cvs.openbsd.org> | 2021-04-21 18:27:37 +0000 |
commit | 6dffc02b46300231035fbaca16cc4eb281345af3 (patch) | |
tree | be332e5fef2d917800ae3a44c09770f1cb0d0012 /lib/libmenu/m_item_nam.c | |
parent | 247390cd5e4086723f7bd857d0f00d1a71da740f (diff) |
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.
Diffstat (limited to 'lib/libmenu/m_item_nam.c')
0 files changed, 0 insertions, 0 deletions