]> granicus.if.org Git - vim/commitdiff
patch 8.2.3734: Vim9: crash when no pattern match found v8.2.3734
authorBram Moolenaar <Bram@vim.org>
Sat, 4 Dec 2021 13:15:10 +0000 (13:15 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 4 Dec 2021 13:15:10 +0000 (13:15 +0000)
Problem:    Vim9: crash when no pattern match found.
Solution:   Check for error.

src/version.c
src/vim9execute.c

index cdc01a3a7d91ce77332d18547597529a0d790241..7948ecc2c386434e63e7f6541baa6b9d9249e84c 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3734,
 /**/
     3733,
 /**/
index bd7f71e686880d4a0752bb750aea790143cf2cf8..2908e55c71eeef06e27613b0451c24d080910e87 100644 (file)
@@ -1785,6 +1785,8 @@ exec_instructions(ectx_T *ectx)
                    ea.addr_type = ADDR_LINES;
                    ea.cmd = iptr->isn_arg.string;
                    parse_cmd_address(&ea, &error, FALSE);
+                   if (ea.cmd == NULL)
+                       goto on_error;
                    if (error == NULL)
                        error = ex_range_without_command(&ea);
                    if (error != NULL)