diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-07-10 10:09:49 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-07-10 10:09:49 +0000 |
commit | 952e7e7e45876baae0635785ede2698195e3a4b1 (patch) | |
tree | 97a9f851c8f93749668174636e48aa17889d05d5 | |
parent | f65d2ca225ebaccc0006ce014c3409305e500d99 (diff) |
Fix a SEGV after you HUP vi; dean@netbsd.org
-rw-r--r-- | usr.bin/vi/vi/vs_refresh.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr.bin/vi/vi/vs_refresh.c b/usr.bin/vi/vi/vs_refresh.c index 81587608c1a..8e3770a104d 100644 --- a/usr.bin/vi/vi/vs_refresh.c +++ b/usr.bin/vi/vi/vs_refresh.c @@ -779,6 +779,14 @@ vs_modeline(sp) int ellipsis; 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; /* |