提交 f6969b9f 编写于 作者: G Gerd Hoffmann

xhci: fix overflow in usb_xhci_post_load

Found by Coverity.
Reported-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 bd93976a
......@@ -3636,7 +3636,7 @@ static int usb_xhci_post_load(void *opaque, int version_id)
slot->uport = xhci_lookup_uport(xhci, slot_ctx);
assert(slot->uport && slot->uport->dev);
for (epid = 1; epid <= 32; epid++) {
for (epid = 1; epid <= 31; epid++) {
pctx = slot->ctx + 32 * epid;
xhci_dma_read_u32s(xhci, pctx, ep_ctx, sizeof(ep_ctx));
state = ep_ctx[0] & EP_STATE_MASK;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册