From 9b5c9dbfa7074789dd77201ff7893690073e0f0a Mon Sep 17 00:00:00 2001 From: Sean Dewar Date: Wed, 25 Nov 2020 16:02:10 +0000 Subject: 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 --- src/nvim/testdir/test_blob.vim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nvim/testdir') 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 -- cgit