Patch 8.2.3662
Problem:    Illegal memory access if malloc() fails.
Solution:   Check 'foldmethod' is not empty. (closes #9207)
Files:      src/fold.c


*** ../vim-8.2.3661/src/fold.c  2021-07-27 21:00:39.745712396 +0100
--- src/fold.c  2021-11-24 15:11:16.084732649 +0000
***************
*** 307,313 ****
      int
  foldmethodIsManual(win_T *wp)
  {
!     return (wp->w_p_fdm[3] == 'u');
  }
  
  // foldmethodIsIndent() {{{2
--- 307,313 ----
      int
  foldmethodIsManual(win_T *wp)
  {
!     return (wp->w_p_fdm[0] != NUL && wp->w_p_fdm[3] == 'u');
  }
  
  // foldmethodIsIndent() {{{2
***************
*** 327,333 ****
      int
  foldmethodIsExpr(win_T *wp)
  {
!     return (wp->w_p_fdm[1] == 'x');
  }
  
  // foldmethodIsMarker() {{{2
--- 327,333 ----
      int
  foldmethodIsExpr(win_T *wp)
  {
!     return (wp->w_p_fdm[0] != NUL && wp->w_p_fdm[1] == 'x');
  }
  
  // foldmethodIsMarker() {{{2
***************
*** 337,343 ****
      int
  foldmethodIsMarker(win_T *wp)
  {
!     return (wp->w_p_fdm[2] == 'r');
  }
  
  // foldmethodIsSyntax() {{{2
--- 337,343 ----
      int
  foldmethodIsMarker(win_T *wp)
  {
!     return (wp->w_p_fdm[0] != NUL && wp->w_p_fdm[2] == 'r');
  }
  
  // foldmethodIsSyntax() {{{2
*** ../vim-8.2.3661/src/version.c       2021-11-24 14:59:12.573593141 +0000
--- src/version.c       2021-11-24 15:13:09.260714187 +0000
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     3662,
  /**/

-- 
Snoring is prohibited unless all bedroom windows are closed and securely
locked.
                [real standing law in Massachusetts, United States of America]

 /// 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/20211124151359.AACB51C3DF9%40moolenaar.net.

Raspunde prin e-mail lui