From owner-svn-src-all@freebsd.org Tue Oct 25 17:13:59 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64F0BC21172; Tue, 25 Oct 2016 17:13:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 351BA15EF; Tue, 25 Oct 2016 17:13:59 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9PHDwsa076279; Tue, 25 Oct 2016 17:13:58 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9PHDwXo076278; Tue, 25 Oct 2016 17:13:58 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201610251713.u9PHDwXo076278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 25 Oct 2016 17:13:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307937 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 17:13:59 -0000 Author: glebius Date: Tue Oct 25 17:13:58 2016 New Revision: 307937 URL: https://svnweb.freebsd.org/changeset/base/307937 Log: Fix unchecked array reference in the VGA device emulation code. Submitted by: Ilja Van Sprundel Patch by: tychon Security: SA-16:32 Modified: head/usr.sbin/bhyve/vga.c Modified: head/usr.sbin/bhyve/vga.c ============================================================================== --- head/usr.sbin/bhyve/vga.c Tue Oct 25 17:13:46 2016 (r307936) +++ head/usr.sbin/bhyve/vga.c Tue Oct 25 17:13:58 2016 (r307937) @@ -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;