diff --git a/sys/dev/usb/net/if_urndis.c b/sys/dev/usb/net/if_urndis.c index e85b1456163a11cdd44915ec9a26500b9834b618..7529ec7c8dff5a5ce2f300e6f0a07151dfd11782 100644 --- a/sys/dev/usb/net/if_urndis.c +++ b/sys/dev/usb/net/if_urndis.c @@ -547,6 +547,9 @@ urndis_ctrl_handle_query(struct urndis_softc *sc, { const struct urndis_query_comp *msg; uint64_t limit; + if (hdr == NULL || buf == NULL || bufsz == NULL) { + return RNDIS_STATUS_FAILURE; + } msg = (const struct urndis_query_comp *)hdr;