Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Nov 1996 19:58:33 -0800
From:      David Greenman <dg@root.com>
To:        Soren Schmidt <sos@freefall.freebsd.org>
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 
Message-ID:  <199611120358.TAA04500@root.com>
In-Reply-To: Your message of "Mon, 11 Nov 1996 14:21:16 PST." <199611112221.OAA15183@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
>  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611120358.TAA04500>