summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartijn <martijn@openbsd.org>2017-11-10 18:25:48 +0000
committermartijn <martijn@openbsd.org>2017-11-10 18:25:48 +0000
commiteab780968edf8833904d90b3ae5d706468c400cb (patch)
tree31695295700d85e49f3253a4f1341765d7ed6624
parent"unknown KDF type 2" -> "keydisk not found". (diff)
downloadwireguard-openbsd-eab780968edf8833904d90b3ae5d706468c400cb.tar.xz
wireguard-openbsd-eab780968edf8833904d90b3ae5d706468c400cb.zip
Fix a use after free when sending SIGHUP or SIGTERM to vi when in editing
mode. Found while testing previous commit by millert@ OK millert@ and tb@
-rw-r--r--usr.bin/vi/common/recover.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/vi/common/recover.c b/usr.bin/vi/common/recover.c
index a2bca05bde1..1d4b824cae8 100644
--- a/usr.bin/vi/common/recover.c
+++ b/usr.bin/vi/common/recover.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: recover.c,v 1.28 2017/11/10 16:33:11 millert Exp $ */
+/* $OpenBSD: recover.c,v 1.29 2017/11/10 18:25:48 martijn Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -301,8 +301,8 @@ err: rval = 1;
}
/* REQUEST: end the file session. */
- if (LF_ISSET(RCV_ENDSESSION) && file_end(sp, NULL, 1))
- rval = 1;
+ if (LF_ISSET(RCV_ENDSESSION))
+ F_SET(sp, SC_EXIT_FORCE);
return (rval);
}