diff options
| author | Michael Brown | 2016-02-11 19:44:24 +0100 |
|---|---|---|
| committer | Michael Brown | 2016-02-11 20:04:23 +0100 |
| commit | 12b3b578869d5c25a32edd81950e104a286643d7 (patch) | |
| tree | a6c9250db7e8986c130c91a67cab4f3d74258db2 /src/interface | |
| parent | [malloc] Guard against unsigned integer overflow (diff) | |
| download | ipxe-12b3b578869d5c25a32edd81950e104a286643d7.tar.gz ipxe-12b3b578869d5c25a32edd81950e104a286643d7.tar.xz ipxe-12b3b578869d5c25a32edd81950e104a286643d7.zip | |
[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>
Diffstat (limited to 'src/interface')
0 files changed, 0 insertions, 0 deletions
