]> git.proxmox.com Git - mirror_qemu.git/commit
usb: fix unbounded stack warning for xhci_dma_write_u32s
authorPeter Xu <peterx@redhat.com>
Fri, 11 Mar 2016 01:51:46 +0000 (09:51 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 18 Mar 2016 12:42:14 +0000 (13:42 +0100)
commit182b391e797508deba9704cf580325e99260d8c8
tree355a04390a246c8426118b36f9ee7061df4fa7d3
parent0ab6d12ffde7e9235a1b9d79437f5bdda5d80cf1
usb: fix unbounded stack warning for xhci_dma_write_u32s

All the callers for xhci_dma_write_u32s() are using mostly 5 * uint32_t
in len. To avoid unbound stack warning for the function, make it
statically allocated, and assert when it's not big enough in the
future.

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-id: 1457661106-9569-1-git-send-email-peterx@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-xhci.c