Mercurial > vim
comparison src/testdir/test_source.vim @ 28242:5bf82b918cb2 v8.2.4647
patch 8.2.4647: "source" can read past end of copied line
Commit: https://github.com/vim/vim/commit/2bdad6126778f907c0b98002bfebf0e611a3f5db
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 29 19:52:12 2022 +0100
patch 8.2.4647: "source" can read past end of copied line
Problem: "source" can read past end of copied line.
Solution: Add a terminating NUL.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 29 Mar 2022 21:00:04 +0200 |
parents | cb462f4c6b12 |
children | 6a7d94628b5a |
comparison
equal
deleted
inserted
replaced
28241:56e2b05a232f | 28242:5bf82b918cb2 |
---|---|
644 call assert_fails('vim9cmd source ++abcde', 'E484:') | 644 call assert_fails('vim9cmd source ++abcde', 'E484:') |
645 | 645 |
646 %bw! | 646 %bw! |
647 endfunc | 647 endfunc |
648 | 648 |
649 func Test_source_buffer_long_line() | |
650 " This was reading past the end of the line. | |
651 new | |
652 norm300gr0 | |
653 so | |
654 bwipe! | |
655 endfunc | |
656 | |
657 | |
649 " vim: shiftwidth=2 sts=2 expandtab | 658 " vim: shiftwidth=2 sts=2 expandtab |