From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XdwnY-0002oB-0w for qemu-devel@nongnu.org; Tue, 14 Oct 2014 03:45:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XdwnS-0007NO-Q8 for qemu-devel@nongnu.org; Tue, 14 Oct 2014 03:45:35 -0400 From: Gerd Hoffmann Date: Tue, 14 Oct 2014 09:45:10 +0200 Message-Id: <1413272710-10458-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1413272710-10458-1-git-send-email-kraxel@redhat.com> References: <1413272710-10458-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 5/5] vmware-vga: use vmsvga_verify_rect in vmsvga_fill_rect List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, pmatouse@redhat.com, Intel.Product.Security.Incident.Response.Team@intel.com, Gerd Hoffmann Add verification to vmsvga_fill_rect, re-enable HW_FILL_ACCEL. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann --- hw/display/vmware_vga.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index d29470b..a52346c 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -30,9 +30,7 @@ #undef VERBOSE #define HW_RECT_ACCEL -#if 0 #define HW_FILL_ACCEL -#endif #define HW_MOUSE_ACCEL #include "vga_int.h" @@ -452,6 +450,10 @@ static inline void vmsvga_fill_rect(struct vmsvga_state_s *s, uint8_t *src; uint8_t col[4]; + if (!vmsvga_verify_rect(surface, __func__, x, y, w, h)) { + return; + } + col[0] = c; col[1] = c >> 8; col[2] = c >> 16; -- 1.8.3.1