From owner-cvs-sys Mon Nov 11 19:59:25 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id TAA12699 for cvs-sys-outgoing; Mon, 11 Nov 1996 19:59:25 -0800 (PST) Received: from root.com (implode.root.com [198.145.90.17]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id TAA12682; Mon, 11 Nov 1996 19:59:17 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by root.com (8.7.6/8.6.5) with SMTP id TAA04500; Mon, 11 Nov 1996 19:58:33 -0800 (PST) Message-Id: <199611120358.TAA04500@root.com> X-Authentication-Warning: implode.root.com: Host localhost [127.0.0.1] didn't use HELO protocol To: Soren Schmidt cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/isa syscons.c In-reply-to: Your message of "Mon, 11 Nov 1996 14:21:16 PST." <199611112221.OAA15183@freefall.freebsd.org> From: David Greenman Reply-To: dg@root.com Date: Mon, 11 Nov 1996 19:58:33 -0800 Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 4. (Most important.) Don't corrupt memory beyond the screen buffers if > the cursor happens to be off the 80x25 screen when syscons starts. Should this patch be brought into 2.1.6? Index: syscons.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/syscons.c,v retrieving revision 1.117.4.12 diff -c -r1.117.4.12 syscons.c *** syscons.c 1996/06/27 21:39:55 1.117.4.12 --- syscons.c 1996/11/12 03:55:19 *************** *** 1984,1989 **** --- 1984,1996 ---- outb(crtc_addr, 15); hw_cursor |= inb(crtc_addr + 1); + /* + * Validate cursor location. It may be off the screen. Then we must + * not use it for the initial buffer offset. + */ + if (hw_cursor >= ROW * COL) + hw_cursor = (ROW - 1) * COL; + /* move hardware cursor out of the way */ outb(crtc_addr, 14); outb(crtc_addr + 1, 0xff); -DG David Greenman Core-team/Principal Architect, The FreeBSD Project