Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
27371:718b899f73ea | 27372:81d391f7c189 |
---|---|
1511 */ | 1511 */ |
1512 ccline.cmdfirstc = (firstc == '@' ? 0 : firstc); | 1512 ccline.cmdfirstc = (firstc == '@' ? 0 : firstc); |
1513 ccline.cmdindent = (firstc > 0 ? indent : 0); | 1513 ccline.cmdindent = (firstc > 0 ? indent : 0); |
1514 | 1514 |
1515 // alloc initial ccline.cmdbuff | 1515 // alloc initial ccline.cmdbuff |
1516 alloc_cmdbuff(exmode_active ? 250 : indent + 1); | 1516 alloc_cmdbuff(indent + 50); |
1517 if (ccline.cmdbuff == NULL) | 1517 if (ccline.cmdbuff == NULL) |
1518 return FAIL; | 1518 return FAIL; |
1519 ccline.cmdlen = ccline.cmdpos = 0; | 1519 ccline.cmdlen = ccline.cmdpos = 0; |
1520 ccline.cmdbuff[0] = NUL; | 1520 ccline.cmdbuff[0] = NUL; |
1521 sb_text_start_cmdline(); | 1521 sb_text_start_cmdline(); |