0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

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 #5890)  Adjust error messages.
This commit is contained in:
Bram Moolenaar
2020-04-06 21:12:42 +02:00
parent 6c307dcd55
commit 15352dc6ec
3 changed files with 16 additions and 11 deletions

View File

@@ -257,6 +257,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