summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2005-10-07 06:33:12 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2005-10-07 06:33:12 +0000
commit29d8d47802df75df2acea305dda8499a2cb9d8dd (patch)
treef14b5edead261213247a4637e19beab142e746ff
parent83594f159095bf53c4e153a9b1d68e1e61ec69d8 (diff)
fixes rev 1.50. got a stack smashed.
looks like i committed the wrong version.
-rw-r--r--sys/dev/pci/if_iwi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index fb90d755579..96ba51591fd 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.50 2005/10/06 20:33:39 damien Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.51 2005/10/07 06:33:11 damien Exp $ */
/*-
* Copyright (c) 2004, 2005
@@ -1818,7 +1818,7 @@ iwi_set_chan(struct iwi_softc *sc, struct ieee80211_channel *chan)
struct iwi_scan scan;
bzero(&scan, sizeof scan);
- memset(scan.type, 26, IWI_SCAN_TYPE_PASSIVE);
+ memset(scan.type, IWI_SCAN_TYPE_PASSIVE, sizeof scan.type);
scan.passive = htole16(2000);
scan.channels[0] = 1 |
(IEEE80211_IS_CHAN_5GHZ(chan) ? IWI_CHAN_5GHZ : IWI_CHAN_2GHZ);
@@ -1840,10 +1840,10 @@ iwi_scan(struct iwi_softc *sc)
if (ic->ic_des_esslen != 0) {
scan.bdirected = htole16(40);
- memset(scan.type, 26, IWI_SCAN_TYPE_BDIRECTED);
+ memset(scan.type, IWI_SCAN_TYPE_BDIRECTED, sizeof scan.type);
} else {
scan.broadcast = htole16(40);
- memset(scan.type, 26, IWI_SCAN_TYPE_BROADCAST);
+ memset(scan.type, IWI_SCAN_TYPE_BROADCAST, sizeof scan.type);
}
p = scan.channels;