summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcs <jcs@openbsd.org>2016-01-12 19:16:21 +0000
committerjcs <jcs@openbsd.org>2016-01-12 19:16:21 +0000
commitcaf59bf3351e34565e7a3cc102a002577f494dca (patch)
tree58a5c1ed0355b0c4e7715d22b7935350e3986345
parentzap trailing whitespace (diff)
downloadwireguard-openbsd-caf59bf3351e34565e7a3cc102a002577f494dca.tar.xz
wireguard-openbsd-caf59bf3351e34565e7a3cc102a002577f494dca.zip
properly initialize quirks before sending them to hid layer, broken
during hid abstraction problem noticed and fix tested by abieber
-rw-r--r--sys/dev/usb/ukbd.c4
-rw-r--r--sys/dev/usb/ums.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index ed637adbfc1..e840b25a3df 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukbd.c,v 1.75 2016/01/09 04:14:42 jcs Exp $ */
+/* $OpenBSD: ukbd.c,v 1.76 2016/01/12 19:16:21 jcs Exp $ */
/* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -207,7 +207,7 @@ ukbd_attach(struct device *parent, struct device *self, void *aux)
struct hidkbd *kbd = &sc->sc_kbd;
struct uhidev_attach_arg *uha = (struct uhidev_attach_arg *)aux;
struct usb_hid_descriptor *hid;
- u_int32_t quirks, qflags;
+ u_int32_t quirks, qflags = 0;
int dlen, repid;
int console = 1;
void *desc;
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index a1ab3e71059..f9cd4ac6cc5 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ums.c,v 1.42 2016/01/09 04:14:42 jcs Exp $ */
+/* $OpenBSD: ums.c,v 1.43 2016/01/12 19:16:21 jcs Exp $ */
/* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -121,7 +121,7 @@ ums_attach(struct device *parent, struct device *self, void *aux)
struct usb_attach_arg *uaa = uha->uaa;
int size, repid;
void *desc;
- u_int32_t quirks, qflags;
+ u_int32_t quirks, qflags = 0;
sc->sc_hdev.sc_intr = ums_intr;
sc->sc_hdev.sc_parent = uha->parent;