summaryrefslogtreecommitdiff
path: root/usr.sbin/Makefile.inc
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2018-01-30 20:19:07 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2018-01-30 20:19:07 +0000
commitf574ef43099c67805e79af7fad3d6ea5017a5739 (patch)
tree5bbddd6850566c5fd4348e0a7a4ffec9435b2e74 /usr.sbin/Makefile.inc
parent2d62706cbb8a078c727473ae0870e409d5e22f1b (diff)
Fix TFTP reading of zero-size files:
The AllocatePages EFI call returns an error when the allocation size is 0. Skip allocating memory and actually transferring the file when it is empty. Properly return the number of unread bytes so that a read() of n bytes does not return n if no bytes were read. While here, disallow lseek() beyond the TFTP file buffer for SEEK_CUR as we already do for SEEK_SET. ok patrick@
Diffstat (limited to 'usr.sbin/Makefile.inc')
0 files changed, 0 insertions, 0 deletions