diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-05-01 14:04:18 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2020-05-01 14:04:18 +0000 |
commit | 29765bb4b91c35bc8b94001c6ff75c5521df4719 (patch) | |
tree | 21eacae6fb432f319e8cfe1bb7d1915128fab108 /sys/dev/pci/if_iwn.c | |
parent | 0c7e4077a8fdb4367d4e09c68ccfe0cb7cb60b06 (diff) |
Prevent divide-by-zero in MiRA which I managed to trigger with iwn(4).
ok deraadt@
Diffstat (limited to 'sys/dev/pci/if_iwn.c')
-rw-r--r-- | sys/dev/pci/if_iwn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c index b0fb1ec2174..6b6331d167a 100644 --- a/sys/dev/pci/if_iwn.c +++ b/sys/dev/pci/if_iwn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwn.c,v 1.227 2020/04/27 08:02:24 stsp Exp $ */ +/* $OpenBSD: if_iwn.c,v 1.228 2020/05/01 14:04:17 stsp Exp $ */ /*- * Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr> @@ -2402,6 +2402,7 @@ iwn_rx_compressed_ba(struct iwn_softc *sc, struct iwn_rx_desc *desc, */ if (txdata->m != NULL && txdata->ampdu_id == id && txdata->ampdu_txmcs == ni->ni_txmcs && + txdata->ampdu_nframes > 0 && (SEQ_LT(ba->ba_winend, s) || (ba->ba_bitmap & (1 << bit)) == 0)) { have_ack++; |