To: vim_dev@googlegroups.com Subject: Patch 8.2.3674 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3674 Problem: When ml_get_buf() fails it messes up IObuff. Solution: Return a local pointer. (closes #9214) Files: src/memline.c *** ../vim-8.2.3673/src/memline.c 2021-10-19 22:12:21.936582330 +0100 --- src/memline.c 2021-11-25 13:52:07.223678254 +0000 *************** *** 2606,2611 **** --- 2606,2612 ---- bhdr_T *hp; DATA_BL *dp; static int recursive = 0; + static char_u questions[4]; if (lnum > buf->b_ml.ml_line_count) // invalid line number { *************** *** 2618,2626 **** --recursive; } errorret: ! STRCPY(IObuff, "???"); buf->b_ml.ml_line_len = 4; ! return IObuff; } if (lnum <= 0) // pretend line 0 is line 1 lnum = 1; --- 2619,2627 ---- --recursive; } errorret: ! STRCPY(questions, "???"); buf->b_ml.ml_line_len = 4; ! return questions; } if (lnum <= 0) // pretend line 0 is line 1 lnum = 1; *** ../vim-8.2.3673/src/version.c 2021-11-25 13:39:22.595524952 +0000 --- src/version.c 2021-11-25 13:52:18.387677464 +0000 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3674, /**/ -- Lawmakers made it obligatory for everybody to take at least one bath each week -- on Saturday night. [real standing law in Vermont, United States of America] /// Bram Moolenaar -- Bram@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 ///