summaryrefslogtreecommitdiffstats
path: root/sys/dev/awi
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>2000-05-29 19:58:10 +0000
committerguido <guido@FreeBSD.org>2000-05-29 19:58:10 +0000
commit66eb05ff879d686e9296dac38fc8615ab7b24cb7 (patch)
tree4fac1ddc612f0c0fa19d1b67bd98d735f180d256 /sys/dev/awi
parent4cb994b8f65cbced1e55c40009ac8ad6032d9c39 (diff)
downloadFreeBSD-src-66eb05ff879d686e9296dac38fc8615ab7b24cb7.zip
FreeBSD-src-66eb05ff879d686e9296dac38fc8615ab7b24cb7.tar.gz
Fix a panic resulting from an obvious null pointer deref.
Apparently some other panics still exist in this driver, but with this fix, it was at least possible to run the Nokia card at SANE 2000.
Diffstat (limited to 'sys/dev/awi')
-rw-r--r--sys/dev/awi/awi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/awi/awi.c b/sys/dev/awi/awi.c
index 75a5737..051d096 100644
--- a/sys/dev/awi/awi.c
+++ b/sys/dev/awi/awi.c
@@ -1420,8 +1420,11 @@ awi_devget(sc, off, len)
if (top != NULL) {
sc->sc_rxpend = NULL;
top->m_pkthdr.len += len;
- while ((m = *mp) != NULL)
+ m = top;
+ while (*mp != NULL) {
+ m = *mp;
mp = &m->m_next;
+ }
if (m->m_flags & M_EXT)
tlen = m->m_ext.ext_size;
else if (m->m_flags & M_PKTHDR)
OpenPOWER on IntegriCloud