From 2d778391877a5dfddee23a04baf6b08ba0984db5 Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 17 May 2006 07:38:58 +0000 Subject: Fix static array overrun. (This will be also fixed in next vendor release.) Coverity ID: 916 Reviewed by: Jack Vogel --- sys/dev/em/if_em_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/em/if_em_hw.c b/sys/dev/em/if_em_hw.c index 6639b44..e81de14 100644 --- a/sys/dev/em/if_em_hw.c +++ b/sys/dev/em/if_em_hw.c @@ -6027,7 +6027,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; -- cgit v1.1