From 64066b9acd9f8cffdf4840f797748f938a13f2d6 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 17 Nov 2021 18:22:56 +0000 Subject: patch 8.2.3612: using freed memory with regexp using a mark Problem: Using freed memory with regexp using a mark. Solution: Get the line again after getting the mark position. --- src/regexp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/regexp.c') diff --git a/src/regexp.c b/src/regexp.c index e28d9e695..4b1474579 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -1129,7 +1129,7 @@ typedef struct { // The current match-position is stord in these variables: linenr_T lnum; // line number, relative to first line char_u *line; // start of current line - char_u *input; // current input, points into "regline" + char_u *input; // current input, points into "line" int need_clear_subexpr; // subexpressions still need to be cleared #ifdef FEAT_SYN_HL -- cgit v1.2.1