Patch 8.0.1346
Problem: Crash when passing 50 char string to balloon_split().
Solution: Fix off-by-one error.
Files: src/testdir/test_popup.vim, src/popupmnu.c
*** ../vim-8.0.1345/src/testdir/test_popup.vim 2017-11-19 20:32:45.576353647
+0100
--- src/testdir/test_popup.vim 2017-11-26 16:28:30.851203806 +0100
***************
*** 708,713 ****
--- 708,717 ----
return
endif
call assert_equal([
+ \ 'tempname: 0x555555e380a0 "/home/mool/.viminfz.tmp"',
+ \ ], balloon_split(
+ \ 'tempname: 0x555555e380a0 "/home/mool/.viminfz.tmp"'))
+ call assert_equal([
\ 'one two three four one two three four one two thre',
\ 'e four',
\ ], balloon_split(
*** ../vim-8.0.1345/src/popupmnu.c 2017-11-19 19:56:21.609895094 +0100
--- src/popupmnu.c 2017-11-26 16:26:36.027862849 +0100
***************
*** 836,842 ****
item->bytelen = p - item->start;
if (item->cells > max_cells)
max_cells = item->cells;
! long_item_count += item->cells / BALLOON_MIN_WIDTH;
}
height = 2 + ga.ga_len;
--- 836,842 ----
item->bytelen = p - item->start;
if (item->cells > max_cells)
max_cells = item->cells;
! long_item_count += (item->cells - 1) / BALLOON_MIN_WIDTH;
}
height = 2 + ga.ga_len;
*** ../vim-8.0.1345/src/version.c 2017-11-26 16:50:37.236262621 +0100
--- src/version.c 2017-11-26 16:52:26.355710666 +0100
***************
*** 773,774 ****
--- 773,776 ----
{ /* Add new patch number below this line */
+ /**/
+ 1346,
/**/
--
Seen it all, done it all, can't remember most of it.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.