NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/40140: nvi + x(delete) key may fall out abort(3)
>Number: 40140
>Category: bin
>Synopsis: nvi + x(delete) key may fall out abort(3)
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 09 10:55:00 +0000 2008
>Originator: Takehiko NOZAKI
>Release: 5.99.4
>Organization:
>Environment:
NetBSD hypnosis 5.99.4 NetBSD 5.99.4 (GENERIC) #1: Tue Dec 9 12:37:33 JST 2008
root@hypnosis:/usr/obj/sys/arch/i386/compile/GENERIC i386
>Description:
nvi + x(delete) key may fall out abort(3).
this bug introduced recently WARN=4 cleanup:
http://mail-index.netbsd.org/source-changes/2008/12/05/msg213717.html
>How-To-Repeat:
open file with vi, and delete some character by x.
>Fix:
Index: db.c
===================================================================
RCS file: /cvsroot/src/dist/nvi/common/db.c,v
retrieving revision 1.2
diff -u -r1.2 db.c
--- db.c 5 Dec 2008 22:51:42 -0000 1.2
+++ db.c 9 Dec 2008 10:32:34 -0000
@@ -652,9 +652,9 @@
case LINE_RESET:
if (lno == scrp->c_lno)
scrp->c_lno = OOBLNO;
- break;
+ /*FALLTHROUGH*/
case LINE_APPEND:
- abort();
+ break;
}
if (ep->c_nlines != OOBLNO)
@@ -664,10 +664,10 @@
break;
case LINE_DELETE:
--ep->c_nlines;
- break;
+ /*FALLTHROUGH*/
case LINE_APPEND:
case LINE_RESET:
- abort();
+ break;
}
}
Home |
Main Index |
Thread Index |
Old Index