mirror of
https://github.com/ipxe/ipxe
synced 2026-10-07 15:05:42 +03:00
Since commit 72db146 ("[tls] Split received records over multiple I/O
buffers"), receive record processing has worked by allocating an I/O
buffer list with exactly enough combined tailroom to hold the incoming
record.
A zero-length record is not permitted by the protocol (and is
impossible when a non-plaintext cipher is in use due to the extra
space reserved at the start of the buffer list to accommodate the IV),
but would currently result in an empty I/O buffer list.
Fix by ensuring that at least one buffer is always allocated even for
a zero total length.
Signed-off-by: Michael Brown <mcb30@ipxe.org>