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 -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220615111334.6C7FF1C2341%40moolenaar.net.