Patch 8.2.5097
Problem: Using uninitialized memory when using 'listchars'.
Solution: Use the length returned by mb_char2bytes(). (closes #10576)
Files: src/message.c
*** ../vim-8.2.5096/src/message.c 2022-06-13 21:42:40.945531339 +0100
--- src/message.c 2022-06-15 12:09:37.634811318 +0100
***************
*** 1920,1927 ****
&& (mb_ptr2char(s) == 160
|| mb_ptr2char(s) == 0x202f))
{
! mb_char2bytes(curwin->w_lcs_chars.nbsp, buf);
! buf[(*mb_ptr2len)(buf)] = NUL;
}
else
{
--- 1920,1928 ----
&& (mb_ptr2char(s) == 160
|| mb_ptr2char(s) == 0x202f))
{
! int len = mb_char2bytes(curwin->w_lcs_chars.nbsp, buf);
!
! buf[len] = NUL;
}
else
{
*** ../vim-8.2.5096/src/version.c 2022-06-14 21:22:08.347386925 +0100
--- src/version.c 2022-06-15 12:12:10.646302976 +0100
***************
*** 736,737 ****
--- 736,739 ----
{ /* Add new patch number below this line */
+ /**/
+ 5097,
/**/
--
Another bucket of what can only be described as human ordure hits ARTHUR.
ARTHUR: ... Right! (to the KNIGHTS) That settles it!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///