From 42854d99e8da99ad11ede13c598887673d8c3338 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Tue, 25 Oct 2016 17:13:58 +0000 Subject: [PATCH] Fix unchecked array reference in the VGA device emulation code. Submitted by: Ilja Van Sprundel Patch by: tychon Security: SA-16:32 --- usr.sbin/bhyve/vga.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/vga.c b/usr.sbin/bhyve/vga.c index 208064b3b2ff..57dc26eae412 100644 --- a/usr.sbin/bhyve/vga.c +++ b/usr.sbin/bhyve/vga.c @@ -161,10 +161,10 @@ struct vga_softc { */ struct { uint8_t dac_state; - int dac_rd_index; - int dac_rd_subindex; - int dac_wr_index; - int dac_wr_subindex; + uint8_t dac_rd_index; + uint8_t dac_rd_subindex; + uint8_t dac_wr_index; + uint8_t dac_wr_subindex; uint8_t dac_palette[3 * 256]; uint32_t dac_palette_rgb[256]; } vga_dac;