david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

1 Commits

Author SHA1 Message Date
Michael Brown 12b3b57886 [iobuf] Improve robustness of I/O buffer allocation
Guard against various corner cases (such as zero-length buffers, zero
alignments, and integer overflow when rounding up allocation lengths
and alignments) and ensure that the struct io_buffer is correctly
aligned even when the caller requests a non-zero alignment for the I/O
buffer itself.

Add self-tests to verify that the resulting alignments and lengths are
correct for a range of allocations.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-02-11 19:04:23 +00:00