yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
9ae3a8
From e7f5ba3d995dde13369b53a61e65cb718ab585b3 Mon Sep 17 00:00:00 2001
9ae3a8
From: Gerd Hoffmann <kraxel@redhat.com>
9ae3a8
Date: Mon, 10 Mar 2014 14:40:49 +0100
9ae3a8
Subject: [PATCH 01/13] xhci: fix overflow in usb_xhci_post_load
9ae3a8
9ae3a8
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
9ae3a8
Message-id: <1394462449-19999-2-git-send-email-kraxel@redhat.com>
9ae3a8
Patchwork-id: 58065
9ae3a8
O-Subject: [RHEL-7 qemu-kvm PATCH 1/1] xhci: fix overflow in usb_xhci_post_load
9ae3a8
Bugzilla: 1074219
9ae3a8
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
9ae3a8
RH-Acked-by: Radim Krcmar <rkrcmar@redhat.com>
9ae3a8
RH-Acked-by: Juan Quintela <quintela@redhat.com>
9ae3a8
9ae3a8
Found by Coverity.
9ae3a8
9ae3a8
Reported-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
9ae3a8
(cherry picked from commit f6969b9fef543da1ffa975d24f4d7b75dc369b03)
9ae3a8
---
9ae3a8
 hw/usb/hcd-xhci.c | 2 +-
9ae3a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 hw/usb/hcd-xhci.c |    2 +-
9ae3a8
 1 files changed, 1 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
9ae3a8
index 87ba7af..fd1bd89 100644
9ae3a8
--- a/hw/usb/hcd-xhci.c
9ae3a8
+++ b/hw/usb/hcd-xhci.c
9ae3a8
@@ -3457,7 +3457,7 @@ static int usb_xhci_post_load(void *opaque, int version_id)
9ae3a8
         slot->uport = xhci_lookup_uport(xhci, slot_ctx);
9ae3a8
         assert(slot->uport && slot->uport->dev);
9ae3a8
 
9ae3a8
-        for (epid = 1; epid <= 32; epid++) {
9ae3a8
+        for (epid = 1; epid <= 31; epid++) {
9ae3a8
             pctx = slot->ctx + 32 * epid;
9ae3a8
             xhci_dma_read_u32s(xhci, pctx, ep_ctx, sizeof(ep_ctx));
9ae3a8
             state = ep_ctx[0] & EP_STATE_MASK;
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8