Hi,
Op wo 24 nov. 2021 16:14 schreef Bram Moolenaar <[email protected]>:
>
> 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,
> /**/
>
Couldn't wp->w_p_fdm itself be NULL?
Christ van Willegen
>
--
--
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/CA%2BOt1Ox26au_i6mRcbtZYHGpock%3DMJpm%2BYgA82kFL3Br39nq0g%40mail.gmail.com.