|
Karsten Hopp |
e05241 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
e05241 |
Subject: patch 7.1.096
|
|
Karsten Hopp |
e05241 |
Fcc: outbox
|
|
Karsten Hopp |
e05241 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
e05241 |
Mime-Version: 1.0
|
|
Karsten Hopp |
e05241 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
e05241 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
e05241 |
------------
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
Patch 7.1.096
|
|
Karsten Hopp |
e05241 |
Problem: Reading past end of a string when resizing Vim. (Dominique Pelle)
|
|
Karsten Hopp |
e05241 |
Solution: Check the string pointer before getting the char it points to.
|
|
Karsten Hopp |
e05241 |
Files: src/message.c
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
*** ../vim-7.1.095/src/message.c Tue Aug 7 21:59:26 2007
|
|
Karsten Hopp |
e05241 |
--- src/message.c Thu Aug 30 22:53:03 2007
|
|
Karsten Hopp |
e05241 |
***************
|
|
Karsten Hopp |
e05241 |
*** 944,949 ****
|
|
Karsten Hopp |
e05241 |
--- 944,950 ----
|
|
Karsten Hopp |
e05241 |
c = K_IGNORE;
|
|
Karsten Hopp |
e05241 |
}
|
|
Karsten Hopp |
e05241 |
#endif
|
|
Karsten Hopp |
e05241 |
+
|
|
Karsten Hopp |
e05241 |
/*
|
|
Karsten Hopp |
e05241 |
* Allow scrolling back in the messages.
|
|
Karsten Hopp |
e05241 |
* Also accept scroll-down commands when messages fill the screen,
|
|
Karsten Hopp |
e05241 |
***************
|
|
Karsten Hopp |
e05241 |
*** 1840,1845 ****
|
|
Karsten Hopp |
e05241 |
--- 1841,1847 ----
|
|
Karsten Hopp |
e05241 |
char_u *sb_str = str;
|
|
Karsten Hopp |
e05241 |
int sb_col = msg_col;
|
|
Karsten Hopp |
e05241 |
int wrap;
|
|
Karsten Hopp |
e05241 |
+ int did_last_char;
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
did_wait_return = FALSE;
|
|
Karsten Hopp |
e05241 |
while ((maxlen < 0 || (int)(s - str) < maxlen) && *s != NUL)
|
|
Karsten Hopp |
e05241 |
***************
|
|
Karsten Hopp |
e05241 |
*** 1909,1915 ****
|
|
Karsten Hopp |
e05241 |
--- 1911,1920 ----
|
|
Karsten Hopp |
e05241 |
else
|
|
Karsten Hopp |
e05241 |
#endif
|
|
Karsten Hopp |
e05241 |
msg_screen_putchar(*s++, attr);
|
|
Karsten Hopp |
e05241 |
+ did_last_char = TRUE;
|
|
Karsten Hopp |
e05241 |
}
|
|
Karsten Hopp |
e05241 |
+ else
|
|
Karsten Hopp |
e05241 |
+ did_last_char = FALSE;
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
if (p_more)
|
|
Karsten Hopp |
e05241 |
/* store text for scrolling back */
|
|
Karsten Hopp |
e05241 |
***************
|
|
Karsten Hopp |
e05241 |
*** 1944,1954 ****
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
/* When we displayed a char in last column need to check if there
|
|
Karsten Hopp |
e05241 |
* is still more. */
|
|
Karsten Hopp |
e05241 |
! if (*s >= ' '
|
|
Karsten Hopp |
e05241 |
! #ifdef FEAT_RIGHTLEFT
|
|
Karsten Hopp |
e05241 |
! && !cmdmsg_rl
|
|
Karsten Hopp |
e05241 |
! #endif
|
|
Karsten Hopp |
e05241 |
! )
|
|
Karsten Hopp |
e05241 |
continue;
|
|
Karsten Hopp |
e05241 |
}
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
--- 1949,1955 ----
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
/* When we displayed a char in last column need to check if there
|
|
Karsten Hopp |
e05241 |
* is still more. */
|
|
Karsten Hopp |
e05241 |
! if (did_last_char)
|
|
Karsten Hopp |
e05241 |
continue;
|
|
Karsten Hopp |
e05241 |
}
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
*** ../vim-7.1.095/src/version.c Wed Sep 5 21:45:54 2007
|
|
Karsten Hopp |
e05241 |
--- src/version.c Thu Sep 6 12:31:28 2007
|
|
Karsten Hopp |
e05241 |
***************
|
|
Karsten Hopp |
e05241 |
*** 668,669 ****
|
|
Karsten Hopp |
e05241 |
--- 668,671 ----
|
|
Karsten Hopp |
e05241 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
e05241 |
+ /**/
|
|
Karsten Hopp |
e05241 |
+ 96,
|
|
Karsten Hopp |
e05241 |
/**/
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
--
|
|
Karsten Hopp |
e05241 |
Yah, well, we had to carve our electrons out of driftwood we'd
|
|
Karsten Hopp |
e05241 |
find. In the winter. Uphill. Both ways.
|
|
Karsten Hopp |
e05241 |
|
|
Karsten Hopp |
e05241 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
e05241 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
e05241 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
e05241 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|