vim-patch:7.4.562 #2593

Problem:    Segfault with wide screen and error in 'rulerformat'. (Ingo Karkat)
Solution:   Check there is enough space. (Christian Brabandt)

https://github.com/vim/vim/commit/v7-4-562
This commit is contained in:
David Bürgin
2015-05-03 17:03:39 +02:00
committed by Justin M. Keyes
parent f525284778
commit 7a7d082e12
3 changed files with 8 additions and 2 deletions

View File

@@ -3511,6 +3511,11 @@ build_stl_str_hl (
*/
void get_rel_pos(win_T *wp, char_u *buf, int buflen)
{
// Need at least 3 chars for writing.
if (buflen < 3) {
return;
}
long above; /* number of lines above window */
long below; /* number of lines below window */