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 -- Br...@Moolenaar.net --
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 ///