Patch 8.2.4663
Problem:    Occasional crash when running the GUI tests.
Solution:   Check that the line index is not too high. (closes #8681)
Files:      src/screen.c


*** ../vim-8.2.4662/src/screen.c        2022-03-03 11:45:37.347173149 +0000
--- src/screen.c        2022-04-01 19:43:24.909692593 +0100
***************
*** 3634,3642 ****
  
  /*
   * insert lines on the screen and update ScreenLines[]
!  * 'end' is the line after the scrolled part. Normally it is Rows.
!  * When scrolling region used 'off' is the offset from the top for the region.
!  * 'row' and 'end' are relative to the start of the region.
   *
   * return FAIL for failure, OK for success.
   */
--- 3634,3642 ----
  
  /*
   * insert lines on the screen and update ScreenLines[]
!  * "end" is the line after the scrolled part. Normally it is Rows.
!  * When scrolling region used "off" is the offset from the top for the region.
!  * "row" and "end" are relative to the start of the region.
   *
   * return FAIL for failure, OK for success.
   */
***************
*** 3661,3674 ****
      /*
       * FAIL if
       * - there is no valid screen
-      * - the screen has to be redrawn completely
       * - the line count is less than one
       * - the line count is more than 'ttyscroll'
       * - redrawing for a callback and there is a modeless selection
       * - there is a popup window
       */
       if (!screen_valid(TRUE)
             || line_count <= 0 || line_count > p_ttyscroll
  #ifdef FEAT_CLIPBOARD
             || (clip_star.state != SELECT_CLEARED
                                                 && redrawing_for_callback > 0)
--- 3661,3675 ----
      /*
       * FAIL if
       * - there is no valid screen
       * - the line count is less than one
       * - the line count is more than 'ttyscroll'
+      * - "end" is more than "Rows" (safety check, should not happen)
       * - redrawing for a callback and there is a modeless selection
       * - there is a popup window
       */
       if (!screen_valid(TRUE)
             || line_count <= 0 || line_count > p_ttyscroll
+            || end > Rows
  #ifdef FEAT_CLIPBOARD
             || (clip_star.state != SELECT_CLEARED
                                                 && redrawing_for_callback > 0)
***************
*** 3896,3908 ****
       * - the screen has to be redrawn completely
       * - the line count is less than one
       * - the line count is more than 'ttyscroll'
       * - redrawing for a callback and there is a modeless selection
       */
!     if (!screen_valid(TRUE) || line_count <= 0
!                                       || (!force && line_count > p_ttyscroll)
  #ifdef FEAT_CLIPBOARD
!            || (clip_star.state != SELECT_CLEARED
!                                                && redrawing_for_callback > 0)
  #endif
         )
        return FAIL;
--- 3897,3911 ----
       * - the screen has to be redrawn completely
       * - the line count is less than one
       * - the line count is more than 'ttyscroll'
+      * - "end" is more than "Rows" (safety check, should not happen)
       * - redrawing for a callback and there is a modeless selection
       */
!     if (!screen_valid(TRUE)
!           || line_count <= 0
!           || (!force && line_count > p_ttyscroll)
!           || end > Rows
  #ifdef FEAT_CLIPBOARD
!           || (clip_star.state != SELECT_CLEARED && redrawing_for_callback > 0)
  #endif
         )
        return FAIL;
*** ../vim-8.2.4662/src/version.c       2022-04-01 15:26:54.988558723 +0100
--- src/version.c       2022-04-01 19:44:07.541756566 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     4663,
  /**/

-- 
BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One.
ANOTHER MONK:    And St.  Attila raised his hand grenade up on high saying "O
                 Lord bless this thy hand grenade that with it thou mayest
                 blow thine enemies to tiny bits, in thy mercy. "and the Lord
                 did grin and people did feast upon the lambs and sloths and
                 carp and anchovies and orang-utans and breakfast cereals and
                 fruit bats and...
BROTHER MAYNARD: Skip a bit brother ...
                 "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/20220401184515.41FFC1C039E%40moolenaar.net.

Raspunde prin e-mail lui