267 lines
6.9 KiB
Diff
267 lines
6.9 KiB
Diff
|
|
From 3558afe9e9e904cabb8475392d859f2d2fc21041 Mon Sep 17 00:00:00 2001
|
|||
|
|
From: Bram Moolenaar <Bram@vim.org>
|
|||
|
|
Date: Thu, 13 Oct 2022 16:12:57 +0100
|
|||
|
|
Subject: [PATCH] patch 9.0.0742: reading past end of the line when compiling a
|
|||
|
|
function
|
|||
|
|
|
|||
|
|
Problem: Reading past end of the line when compiling a function with
|
|||
|
|
errors.
|
|||
|
|
Solution: Do not return an invalid pointer. Fix skipping redirection.
|
|||
|
|
---
|
|||
|
|
src/testdir/test_vim9_func.vim | 27 ++++++++++++++
|
|||
|
|
src/testdir/test_vim9_script.vim | 55 ++++++++++++++++++++++++++--
|
|||
|
|
src/vim9cmds.c | 62 ++++++++++++++++++--------------
|
|||
|
|
src/vim9compile.c | 23 +++++++++---
|
|||
|
|
4 files changed, 134 insertions(+), 33 deletions(-)
|
|||
|
|
|
|||
|
|
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
|
|||
|
|
index 38766e330156..bb5635626484 100644
|
|||
|
|
--- a/src/testdir/test_vim9_func.vim
|
|||
|
|
+++ b/src/testdir/test_vim9_func.vim
|
|||
|
|
@@ -4217,6 +4217,33 @@ def Test_multiple_funcref()
|
|||
|
|
v9.CheckScriptSuccess(lines)
|
|||
|
|
enddef
|
|||
|
|
|
|||
|
|
+def Test_invalid_redir()
|
|||
|
|
+ var lines =<< trim END
|
|||
|
|
+ def Tone()
|
|||
|
|
+ if 1
|
|||
|
|
+ redi =>@ |