Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/usr.bin/vi/vi Pull up revision 1.11 (requested by aymer...



details:   https://anonhg.NetBSD.org/src/rev/b4d356fb98e6
branches:  netbsd-1-6
changeset: 530368:b4d356fb98e6
user:      grant <grant%NetBSD.org@localhost>
date:      Thu Jun 19 02:29:09 2003 +0000

description:
Pull up revision 1.11 (requested by aymeric in ticket #1320):

When an error occurs in v_txt(), leave input mode too.
Otherwise, (among other things) db_get() thinks it can re-use the TEXT buffers
when it's not true, leading to a crash because that TEXT buffer will be
released just before it is actually used to create a new one.
This fixes PR#21797.

diffstat:

 usr.bin/vi/vi/v_txt.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r f2f1502cc340 -r b4d356fb98e6 usr.bin/vi/vi/v_txt.c
--- a/usr.bin/vi/vi/v_txt.c     Thu Jun 19 02:26:50 2003 +0000
+++ b/usr.bin/vi/vi/v_txt.c     Thu Jun 19 02:29:09 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: v_txt.c,v 1.9 2002/04/09 01:47:36 thorpej Exp $        */
+/*     $NetBSD: v_txt.c,v 1.9.2.1 2003/06/19 02:29:09 grant Exp $      */
 
 /*-
  * Copyright (c) 1993, 1994
@@ -16,7 +16,7 @@
 #if 0
 static const char sccsid[] = "@(#)v_txt.c      10.87 (Berkeley) 10/13/96";
 #else
-__RCSID("$NetBSD: v_txt.c,v 1.9 2002/04/09 01:47:36 thorpej Exp $");
+__RCSID("$NetBSD: v_txt.c,v 1.9.2.1 2003/06/19 02:29:09 grant Exp $");
 #endif
 #endif /* not lint */
 
@@ -1471,6 +1471,7 @@
 
 err:
 alloc_err:
+       F_CLR(sp, SC_TINPUT);
        txt_err(sp, &sp->tiq);
        return (1);
 }



Home | Main Index | Thread Index | Old Index