summaryrefslogtreecommitdiffstats
path: root/src/image/segment.c
diff options
context:
space:
mode:
authorMichael Brown2020-10-02 01:04:26 +0200
committerMichael Brown2020-10-02 01:04:26 +0200
commiteede697ece879c5f9bba341a155f03235c42f2df (patch)
tree7c062987233342b34a916f00162129338ca218f7 /src/image/segment.c
parent[efi] Fix reporting of USB supported languages array (diff)
downloadipxe-eede697ece879c5f9bba341a155f03235c42f2df.tar.gz
ipxe-eede697ece879c5f9bba341a155f03235c42f2df.tar.xz
ipxe-eede697ece879c5f9bba341a155f03235c42f2df.zip
[ncm] Treat a zero divisor as indicating no alignment requirements
A zero divisor will currently lead to a 16-bit integer overflow when calculating the transmit padding, and a potential division by zero if assertions are enabled. Avoid these problems by treating a divisor value of zero as equivalent to a divisor value of one (i.e. no alignment requirements). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/image/segment.c')
0 files changed, 0 insertions, 0 deletions