diff options
| author | Sean Dewar <seandewar@users.noreply.github.com> | 2020-11-25 16:02:10 +0000 |
|---|---|---|
| committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-09-15 22:57:54 +0100 |
| commit | 9b5c9dbfa7074789dd77201ff7893690073e0f0a (patch) | |
| tree | 6ec203dfa98d6811e76816c7d2f17f945dfad0c9 /src/nvim/testdir | |
| parent | ba34afb37849a8bdf5d601ced7f3c139a80cd396 (diff) | |
| download | rneovim-9b5c9dbfa7074789dd77201ff7893690073e0f0a.tar.gz rneovim-9b5c9dbfa7074789dd77201ff7893690073e0f0a.tar.bz2 rneovim-9b5c9dbfa7074789dd77201ff7893690073e0f0a.zip | |
vim-patch:8.2.0521: crash when reading a blob fails
Problem: Crash when reading a blob fails.
Solution: Avoid keeping a pointer to a freed blob object. (Dominique Pelle,
closes vim/vim#5890) Adjust error messages.
https://github.com/vim/vim/commit/15352dc6ec43fd50cc3be4f4fd1ad74d5619da20
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_blob.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_blob.vim b/src/nvim/testdir/test_blob.vim index 19f1f6bd42..a102a4d6bd 100644 --- a/src/nvim/testdir/test_blob.vim +++ b/src/nvim/testdir/test_blob.vim @@ -256,6 +256,9 @@ func Test_blob_read_write() let br = readfile('Xblob', 'B') call assert_equal(b, br) call delete('Xblob') + + " This was crashing when calling readfile() with a directory. + call assert_fails("call readfile('.', 'B')", 'E17: "." is a directory') endfunc " filter() item in blob |