From mi@aldan.zipnet.net  Sun Sep 22 15:49:26 1996
Received: from aldan.zipnet.net (aldan.zipnet.net [199.232.255.49])
          by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA27587
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 22 Sep 1996 15:49:23 -0700 (PDT)
Received: (from mi@localhost) by aldan.zipnet.net (8.6.12/8.6.12) id SAA19197; Sun, 22 Sep 1996 18:46:43 -0400
Message-Id: <199609222246.SAA19197@aldan.zipnet.net>
Date: Sun, 22 Sep 1996 18:46:43 -0400
From: Mikhail Teterin <mi@aldan.zipnet.net>
Reply-To: mi@aldan.zipnet.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: consistent crash in /usr/bin/vi
X-Send-Pr-Version: 3.2

>Number:         1666
>Category:       bin
>Synopsis:       crash in vi, while reading multiple files
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 22 15:50:01 PDT 1996
>Closed-Date:    Sat Nov 9 17:50:52 PST 1996
>Last-Modified:  Sat Nov  9 17:52:50 PST 1996
>Originator:     Mikhail Teterin
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
>Environment:

	Same bug exists in the August snapshot -- did not seem to change
	since 
		Version 1.34, Wed Aug 17 14:37:48 1994
		The CSRG, University of California, Berkeley.

>Description:

	The files I attempted to edit are as follows:
	-rw-------  1 mi    bin  262 Aug 14 22:10 /tmp/est.15658
	-rw-------  1 root  bin  100 Aug  9 22:12 /tmp/est.3042

	being a humble `mi' without root's privileges, I get a
	"permission denied" error from vi, when I attempt to use the
	`:n' command. My next stupid `:n' will crash vi with a seg-fault
	(I guess, list of files to be edited has ended with NULL, but the
	second file is still marked as not-looked-at or smth, because an
	attempt to read it failed).

>How-To-Repeat:

	cd /tmp
	touch q w
	chmod 600 q w
	su
	chown root w
	exit
	vi q w
	:n
	:n

>Fix:
	
	Avoid looking at files unreadable to you :)

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: fenner 
State-Changed-When: Mon Oct 21 14:48:19 PDT 1996 
State-Changed-Why:  
This is a bug in nvi-1.34 .  Later releases of nvi have fixed this bug, 
and at some point we will import a newer release of nvi into FreeBSD. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: fenner 
State-Changed-When: Sat Nov 9 17:50:52 PST 1996 
State-Changed-Why:  
peter imported nvi 1.79 
>Unformatted:
