Date: Thu, 4 May 2000 03:21:59 -0400 (EDT) From: jon@spock.org To: FreeBSD-gnats-submit@freebsd.org Subject: kern/18381: syscons off by 1 error handling e[1J Message-ID: <200005040721.DAA41967@spock.org>
next in thread | raw e-mail | index | archive | help
>Number: 18381 >Category: kern >Synopsis: syscons off by 1 error handling \e[1J >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 4 00:30:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Jonathan Chen >Release: 4.0-STABLE / 5.0-CURRENT >Organization: >Environment: >Description: Off by one error in sys/dev/syscons/sctermvar.h function sc_term_clr_eos() Call to sc_vtb_erase() needs the length instead of ending position. >How-To-Repeat: echo "\e[1;1AAA...AAA\e[1;10H\e[1J\e[2;10H\e[1K" >Fix: Index: sctermvar.h =================================================================== RCS file: /export/ncvs/src/sys/dev/syscons/sctermvar.h,v retrieving revision 1.1 diff -u -r1.1 sctermvar.h --- sctermvar.h 2000/01/15 15:25:37 1.1 +++ sctermvar.h 2000/05/04 07:08:43 @@ -221,7 +221,7 @@ sc_remove_cutmarking(scp); break; case 1: /* clear from beginning of display to cursor */ - sc_vtb_erase(&scp->vtb, 0, scp->cursor_pos, ch, attr); + sc_vtb_erase(&scp->vtb, 0, scp->cursor_pos+1, ch, attr); mark_for_update(scp, 0); mark_for_update(scp, scp->cursor_pos); sc_remove_cutmarking(scp); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005040721.DAA41967>