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:
@@ -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
|
||||
|
Reference in New Issue
Block a user