Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jul 2009 21:32:26 GMT
From:      Frank Sheiness <frank@dough.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/136393: ^C causes breakage in /usr/bin/vi
Message-ID:  <200907062132.n66LWQ8i024438@www.freebsd.org>
Resent-Message-ID: <200907062140.n66Le2Fs099601@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         136393
>Category:       bin
>Synopsis:       ^C causes breakage in /usr/bin/vi
>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:   Mon Jul 06 21:40:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Frank Sheiness
>Release:        7.2-STABLE
>Organization:
>Environment:
FreeBSD forbidden 7.2-STABLE FreeBSD 7.2-STABLE #8: Sat May 16 00:39:53 CDT 2009     root@forbidden:/usr/obj/usr/src/sys/FORBIDDEN  i386
>Description:
When using /usr/bin/vi, I use control-C to get out of insert mode.  If I do that and then try to use the '.' command to repeat an action, I get a bunch of junk dumped into my buffer.  On some older versions of FreeBSD, this causes a segmentation fault.

I believe the function file_end() is called when I hit ^C, and it free()s 'ep' on line 724 of exf.c

Then that free()d value is used later when the screen is repainted.
>How-To-Repeat:
/usr/bin/vi
Type: 'i' to enter insert mode
Type: abc
Type: Ctrl-C
Type: 0 to go to the beginning of the line
Type: cw
Type: def
Type: Ctrl-C
Type: .
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



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