| commit | eede697ece879c5f9bba341a155f03235c42f2df | [log] [tgz] |
|---|---|---|
| author | Michael Brown <mcb30@ipxe.org> | Fri Oct 02 00:04:26 2020 +0100 |
| committer | Michael Brown <mcb30@ipxe.org> | Fri Oct 02 00:04:26 2020 +0100 |
| tree | 7c062987233342b34a916f00162129338ca218f7 | |
| parent | 02201417104c751545dda261eb33f0012703d1ff [diff] |
[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>