diff options
| author | Michael Brown | 2020-10-02 01:04:26 +0200 |
|---|---|---|
| committer | Michael Brown | 2020-10-02 01:04:26 +0200 |
| commit | eede697ece879c5f9bba341a155f03235c42f2df (patch) | |
| tree | 7c062987233342b34a916f00162129338ca218f7 /src/tests/math_test.c | |
| parent | [efi] Fix reporting of USB supported languages array (diff) | |
| download | ipxe-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/tests/math_test.c')
0 files changed, 0 insertions, 0 deletions
