Date: Tue, 12 Nov 1996 08:45:43 +0100 (MET) From: sos@FreeBSD.org To: dg@root.com Cc: sos@freefall.freebsd.org, 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 Message-ID: <199611120745.IAA24378@ra.dkuug.dk> In-Reply-To: <199611120358.TAA04500@root.com> from "David Greenman" at Nov 11, 96 07:58:33 pm
next in thread | previous in thread | raw e-mail | index | archive | help
In reply to David Greenman who wrote:
>
> > 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?
It wont hurt..
>
> 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
>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Soren Schmidt (sos@FreeBSD.org) FreeBSD Core Team
So much code to hack -- so little time.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611120745.IAA24378>
