Mercurial > vim
comparison src/testdir/test_popup.vim @ 12940:5045d3076db0 v8.0.1346
patch 8.0.1346: crash when passing 50 char string to balloon_split()
commit https://github.com/vim/vim/commit/a3571ebef5a2969d16e3e202ec4bca8858aca6ba
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 26 16:53:16 2017 +0100
patch 8.0.1346: crash when passing 50 char string to balloon_split()
Problem: Crash when passing 50 char string to balloon_split().
Solution: Fix off-by-one error.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 26 Nov 2017 17:00:07 +0100 |
parents | ffc7004e9041 |
children | ae5f855a64be |
comparison
equal
deleted
inserted
replaced
12939:f5b8129cef2f | 12940:5045d3076db0 |
---|---|
706 func Test_balloon_split() | 706 func Test_balloon_split() |
707 if !exists('*balloon_split') | 707 if !exists('*balloon_split') |
708 return | 708 return |
709 endif | 709 endif |
710 call assert_equal([ | 710 call assert_equal([ |
711 \ 'tempname: 0x555555e380a0 "/home/mool/.viminfz.tmp"', | |
712 \ ], balloon_split( | |
713 \ 'tempname: 0x555555e380a0 "/home/mool/.viminfz.tmp"')) | |
714 call assert_equal([ | |
711 \ 'one two three four one two three four one two thre', | 715 \ 'one two three four one two three four one two thre', |
712 \ 'e four', | 716 \ 'e four', |
713 \ ], balloon_split( | 717 \ ], balloon_split( |
714 \ 'one two three four one two three four one two three four')) | 718 \ 'one two three four one two three four one two three four')) |
715 | 719 |