Patch 8.2.2458
Problem:    Coverity warns for :retab using freed memory.
Solution:   Use the updated line pointer when moving text properties.
Files:      src/indent.c


*** ../vim-8.2.2457/src/indent.c        2020-10-24 20:49:37.498683038 +0200
--- src/indent.c        2021-02-03 19:40:10.613594027 +0100
***************
*** 1662,1668 ****
                        ptr = new_line + start_col;
                        for (col = 0; col < len; col++)
                            ptr[col] = (col < num_tabs) ? '\t' : ' ';
!                       ml_replace(lnum, new_line, FALSE);
                        if (first_line == 0)
                            first_line = lnum;
                        last_line = lnum;
--- 1662,1670 ----
                        ptr = new_line + start_col;
                        for (col = 0; col < len; col++)
                            ptr[col] = (col < num_tabs) ? '\t' : ' ';
!                       if (ml_replace(lnum, new_line, FALSE) == OK)
!                           // "new_line" may have been copied
!                           new_line = curbuf->b_ml.ml_line_ptr;
                        if (first_line == 0)
                            first_line = lnum;
                        last_line = lnum;
*** ../vim-8.2.2457/src/version.c       2021-02-03 19:35:09.610557545 +0100
--- src/version.c       2021-02-03 19:43:07.737027446 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2458,
  /**/

-- 
Back up my hard drive?  I can't find the reverse switch!

 /// 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202102031844.113Iisrr1841796%40masaka.moolenaar.net.

Raspunde prin e-mail lui