Merge "QEMU update with VENOM (CVE-2015-3456) patch" into 5.0.2
[packages/centos6/qemu.git] / 0500-qxl-disallow-unknown-revisions.patch
1 From 4b9d4103e5ff91b022ee8e9522040829f009543a Mon Sep 17 00:00:00 2001
2 From: Alon Levy <alevy@redhat.com>
3 Date: Tue, 21 Aug 2012 13:51:32 +0300
4 Subject: [PATCH] qxl: disallow unknown revisions
5
6 Signed-off-by: Alon Levy <alevy@redhat.com>
7 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 ---
9  hw/qxl.c | 6 +++---
10  1 file changed, 3 insertions(+), 3 deletions(-)
11
12 diff --git a/hw/qxl.c b/hw/qxl.c
13 index 59bf822..71879fe 100644
14 --- a/hw/qxl.c
15 +++ b/hw/qxl.c
16 @@ -1873,9 +1873,9 @@ static int qxl_init_common(PCIQXLDevice *qxl)
17          break;
18  #endif
19      default:
20 -        pci_device_rev = QXL_DEFAULT_REVISION;
21 -        io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1);
22 -        break;
23 +        error_report("Invalid revision %d for qxl device (max %d)",
24 +                     qxl->revision, QXL_DEFAULT_REVISION);
25 +        return -1;
26      }
27  
28      pci_set_byte(&config[PCI_REVISION_ID], pci_device_rev);
29 -- 
30 1.7.12.1
31