Source-Changes-HG archive

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

[src/netbsd-1-4]: src/usr.bin/vi/vi pullup 1.2->1.3 (dean): fix an ugly SEGV



details:   https://anonhg.NetBSD.org/src/rev/bea72474e72c
branches:  netbsd-1-4
changeset: 469197:bea72474e72c
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Jul 09 14:59:38 1999 +0000

description:
pullup 1.2->1.3 (dean): fix an ugly SEGV

diffstat:

 usr.bin/vi/vi/vs_refresh.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 2e09be54bc00 -r bea72474e72c usr.bin/vi/vi/vs_refresh.c
--- a/usr.bin/vi/vi/vs_refresh.c        Thu Jul 08 19:40:49 1999 +0000
+++ b/usr.bin/vi/vi/vs_refresh.c        Fri Jul 09 14:59:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vs_refresh.c,v 1.2 1998/01/09 08:08:52 perry Exp $     */
+/*     $NetBSD: vs_refresh.c,v 1.2.2.1 1999/07/09 14:59:38 perry Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -729,6 +729,15 @@
        const char *t;
        char *p, buf[20];
 
+       /*
+        * It's possible that this routine will be called after sp->frp
+        * has been set to NULL by file_end().  We return immediately
+        * to avoid a SEGV.
+        */
+
+       if (sp->frp == NULL)
+               return;
+
        gp = sp->gp;
 
        /*



Home | Main Index | Thread Index | Old Index