diff src/ex_getln.c @ 27372:81d391f7c189 v8.2.4214

patch 8.2.4214: illegal memory access with large 'tabstop' in Ex mode Commit: https://github.com/vim/vim/commit/85b6747abc15a7a81086db31289cf1b8b17e6cb1 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 25 11:55:02 2022 +0000 patch 8.2.4214: illegal memory access with large 'tabstop' in Ex mode Problem: Illegal memory access with large 'tabstop' in Ex mode. Solution: Allocate enough memory.
author Bram Moolenaar <Bram@vim.org>
date Tue, 25 Jan 2022 13:00:06 +0100
parents a9eeb18e749c
children 4eb2bf8b2f27
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1513,7 +1513,7 @@ init_ccline(int firstc, int indent)
     ccline.cmdindent = (firstc > 0 ? indent : 0);
 
     // alloc initial ccline.cmdbuff
-    alloc_cmdbuff(exmode_active ? 250 : indent + 1);
+    alloc_cmdbuff(indent + 50);
     if (ccline.cmdbuff == NULL)
 	return FAIL;
     ccline.cmdlen = ccline.cmdpos = 0;