From 885b6f474a0d54c9bfa71f8c8da27ea1d3dd3a18 Mon Sep 17 00:00:00 2001 From: SilentE Date: Wed, 27 Dec 2023 19:08:54 +0800 Subject: [PATCH] =?UTF-8?q?CVE-2022-3591=20=E5=AE=89=E5=85=A8=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=EF=BC=9A=E4=BF=AE=E5=A4=8D=E9=87=8A=E6=94=BE=E5=90=8E?= =?UTF-8?q?=E9=87=8D=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/buffer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/buffer.c b/src/buffer.c index 2a84676..fc2748e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1400,6 +1400,14 @@ do_buffer( return FAIL; } + if ((action == DOBUF_GOTO || action == DOBUF_SPLIT) + && (buf->b_flags & BF_DUMMY)) + { + // disallow navigating to the dummy buffer + semsg(_(e_nobufnr), count); + return FAIL; + } + #ifdef FEAT_GUI need_mouse_correct = TRUE; #endif -- Gitee