From owner-svn-src-head@FreeBSD.ORG Mon Aug 25 16:56:34 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49005BF4; Mon, 25 Aug 2014 16:56:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 3465330AE; Mon, 25 Aug 2014 16:56:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7PGuYmj005932; Mon, 25 Aug 2014 16:56:34 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7PGuYCM005931; Mon, 25 Aug 2014 16:56:34 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201408251656.s7PGuYCM005931@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Mon, 25 Aug 2014 16:56:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270587 - head/sys/dev/vt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Aug 2014 16:56:34 -0000 Author: dumbbell Date: Mon Aug 25 16:56:33 2014 New Revision: 270587 URL: http://svnweb.freebsd.org/changeset/base/270587 Log: vt(4): Take font offset into account in vt_is_cursor_in_area() This fixes a "General protection fault" in vt_vga, where vt_is_cursor_in_area() erroneously reported that the cursor was over the text. This led to negative integers stored in "unsigned int" and chaos. MFC after: 1 week Modified: head/sys/dev/vt/vt_core.c Modified: head/sys/dev/vt/vt_core.c ============================================================================== --- head/sys/dev/vt/vt_core.c Mon Aug 25 16:25:18 2014 (r270586) +++ head/sys/dev/vt/vt_core.c Mon Aug 25 16:56:33 2014 (r270587) @@ -828,8 +828,8 @@ vt_is_cursor_in_area(const struct vt_dev * We use the cursor position saved during the current refresh, * in case the cursor moved since. */ - mx = vd->vd_mx_drawn; - my = vd->vd_my_drawn; + mx = vd->vd_mx_drawn + vd->vd_curwindow->vw_offset.tp_col; + my = vd->vd_my_drawn + vd->vd_curwindow->vw_offset.tp_row; x1 = area->tr_begin.tp_col; y1 = area->tr_begin.tp_row;