bin/136393: ^C causes breakage in /usr/bin/vi

Frank Sheiness frank at dough.net
Mon Jul 6 21:40:02 UTC 2009


>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 at 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:


More information about the freebsd-bugs mailing list