mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:partial:9.0.1859: heap-use-after-free in bt_normal()
Problem: heap-use-after-free in bt_normal()
Solution: check that buffer is still valid
6e60cf444a
Test change only.
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
8dc72789cf
commit
bbb363f4bc
5
test/old/testdir/crash/bt_quickfix1_poc
Normal file
5
test/old/testdir/crash/bt_quickfix1_poc
Normal file
@ -0,0 +1,5 @@
|
||||
au BufReadPre * exe 'sn' .. expand("<abuf>")
|
||||
call writefile([''],'X')
|
||||
sil! e X
|
||||
call writefile([''],'X')
|
||||
sil! e X
|
@ -49,6 +49,15 @@ func Test_crash1()
|
||||
|
||||
call TermWait(buf, 100)
|
||||
|
||||
let file = 'crash/bt_quickfix1_poc'
|
||||
let args = printf(cmn_args, vim, file)
|
||||
call term_sendkeys(buf, args ..
|
||||
\ ' && echo "crash 6: [OK]" >> X_crash1_result.txt' .. "\<cr>")
|
||||
" clean up
|
||||
call delete('X')
|
||||
" This test takes a bit longer
|
||||
call TermWait(buf, 200)
|
||||
|
||||
" clean up
|
||||
exe buf .. "bw!"
|
||||
|
||||
@ -60,6 +69,7 @@ func Test_crash1()
|
||||
\ 'crash 3: [OK]',
|
||||
\ 'crash 4: [OK]',
|
||||
\ 'crash 5: [OK]',
|
||||
\ 'crash 6: [OK]',
|
||||
\ ]
|
||||
|
||||
call assert_equal(expected, getline(1, '$'))
|
||||
|
Loading…
Reference in New Issue
Block a user