diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-05-17 20:45:53 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-05-17 20:45:53 +0000 |
commit | a5c4ed6e99fe4622733726dcc28d16e9e4f4d430 (patch) | |
tree | 8ad995d9ee3f987bc5c8e5466c62cc4541f2aee3 | |
parent | 39afbbb44a4985060c2c0aa047b45a957ca00964 (diff) |
Fix static array overrun.
Coverity ID: 916
From FreeBSD
-rw-r--r-- | sys/dev/pci/if_em_hw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_em_hw.c b/sys/dev/pci/if_em_hw.c index 5320d8ae93f..d3af7be0295 100644 --- a/sys/dev/pci/if_em_hw.c +++ b/sys/dev/pci/if_em_hw.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -/* $OpenBSD: if_em_hw.c,v 1.17 2006/04/18 19:06:02 brad Exp $ */ +/* $OpenBSD: if_em_hw.c,v 1.18 2006/05/17 20:45:52 brad Exp $ */ /* if_em_hw.c * Shared functions for accessing and configuring the MAC @@ -6062,7 +6062,7 @@ em_get_cable_length(struct em_hw *hw, { int32_t ret_val; uint16_t agc_value = 0; - uint16_t cur_agc, min_agc = IGP01E1000_AGC_LENGTH_TABLE_SIZE; + uint16_t cur_agc, min_agc = IGP01E1000_AGC_LENGTH_TABLE_SIZE - 1; uint16_t max_agc = 0; uint16_t i, phy_data; uint16_t cable_length; |