mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
Use 'sizeof(data)' rather than '4' when checking an mbuf bound, as is the
case for adjusting length/etc.
This commit is contained in:
parent
0a18924f45
commit
20b39086cc
|
@ -1234,7 +1234,8 @@ atse_rx_locked(struct atse_softc *sc)
|
|||
data = ATSE_RX_DATA_READ(sc);
|
||||
#endif
|
||||
/* Make sure to not overflow the mbuf data size. */
|
||||
if (sc->atse_rx_buf_len >= sc->atse_rx_m->m_len - 4) {
|
||||
if (sc->atse_rx_buf_len >= sc->atse_rx_m->m_len -
|
||||
sizeof(data)) {
|
||||
/*
|
||||
* XXX-BZ Error. We need more mbufs and are
|
||||
* not setup for this yet.
|
||||
|
|
Loading…
Reference in a new issue