From: Li Qiang <liq...@gmail.com> In 'xhci_write_event' function, the 'ev_trb' is not full initialized. This will lead an info leak issue. This patch avoid this.
Signed-off-by: Li Qiang <liq...@gmail.com> --- hw/usb/hcd-xhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index a0c7960..537997e 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -646,6 +646,7 @@ static void xhci_write_event(XHCIState *xhci, XHCIEvent *event, int v) XHCITRB ev_trb; dma_addr_t addr; + memset(&ev_trb, 0, sizeof(ev_trb)); ev_trb.parameter = cpu_to_le64(event->ptr); ev_trb.status = cpu_to_le32(event->length | (event->ccode << 24)); ev_trb.control = (event->slotid << 24) | (event->epid << 16) | -- 2.7.4