avoid out-of-bounds memory access (array size out of sync). found by
openbsd 'bound' attribute.
This commit is contained in:
parent
f8641ea112
commit
c6eceb7a58
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lemac.c,v 1.23 2001/11/13 13:14:40 lukem Exp $ */
|
||||
/* $NetBSD: lemac.c,v 1.24 2003/10/01 08:07:39 itojun Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1995, 1997 Matt Thomas <matt@3am-software.com>
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lemac.c,v 1.23 2001/11/13 13:14:40 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lemac.c,v 1.24 2003/10/01 08:07:39 itojun Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ns.h"
|
||||
@ -98,7 +98,11 @@ static void lemac_rxd_intr(lemac_softc_t *sc, unsigned cs_value);
|
||||
static int lemac_read_eeprom(lemac_softc_t *sc);
|
||||
static void lemac_init_adapmem(lemac_softc_t *sc);
|
||||
|
||||
static const u_int16_t lemac_allmulti_mctbl[16] = {
|
||||
static const u_int16_t lemac_allmulti_mctbl[LEMAC_MCTBL_SIZE/sizeof(u_int16_t)] = {
|
||||
0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
|
||||
0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
|
||||
0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
|
||||
0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
|
||||
0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
|
||||
0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
|
||||
0xFFFFU, 0xFFFFU, 0xFFFFU, 0xFFFFU,
|
||||
|
Loading…
Reference in New Issue
Block a user