Files
ports/security/aircrack-ng/patches/patch-src_aircrack-osdep_openbsd_c
T
2022-03-11 19:53:16 +00:00

30 lines
904 B
Plaintext

Index: src/aircrack-osdep/openbsd.c
--- src/aircrack-osdep/openbsd.c.orig
+++ src/aircrack-osdep/openbsd.c
@@ -37,7 +37,6 @@
#include <net80211/ieee80211_crypto.h>
#include <frame.h>
#include <sys/timeout.h>
-#include <machine/intr.h>
#undef _KERNEL
#include <net80211/ieee80211_node.h>
#include <net80211/ieee80211_ioctl.h>
@@ -322,7 +321,7 @@ static int do_obsd_open(struct wif * wi, char * iface)
int s;
unsigned int flags;
struct ifmediareq ifmr;
- int * mwords;
+ uint64_t * mwords;
struct priv_obsd * po = wi_priv(wi);
unsigned int size = sizeof(po->po_buf);
@@ -353,7 +352,7 @@ static int do_obsd_open(struct wif * wi, char * iface)
assert(ifmr.ifm_count != 0);
- mwords = (int *) malloc(ifmr.ifm_count * sizeof(int));
+ mwords = calloc(ifmr.ifm_count, sizeof(*mwords));
if (!mwords) goto close_sock;
ifmr.ifm_ulist = mwords;
if (ioctl(s, SIOCGIFMEDIA, &ifmr) == -1)