Mercurial > vim
comparison src/edit.c @ 28429:aa9720c76412 v8.2.4739
patch 8.2.4739: accessing freed memory after WinScrolled autocmd event
Commit: https://github.com/vim/vim/commit/d58862d18f091d3c14fa3647e724ef7eea1ecefa
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Apr 12 11:32:48 2022 +0100
patch 8.2.4739: accessing freed memory after WinScrolled autocmd event
Problem: Accessing freed memory after WinScrolled autocmd event.
Solution: Check the window pointer is still valid. (closes https://github.com/vim/vim/issues/10156)
Remove the argument from may_trigger_winscrolled().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 12 Apr 2022 12:45:04 +0200 |
parents | d1702731786c |
children | 4dcccb2673fe |
comparison
equal
deleted
inserted
replaced
28428:eb08141a60cb | 28429:aa9720c76412 |
---|---|
1526 u_save(curwin->w_cursor.lnum, | 1526 u_save(curwin->w_cursor.lnum, |
1527 (linenr_T)(curwin->w_cursor.lnum + 1)); | 1527 (linenr_T)(curwin->w_cursor.lnum + 1)); |
1528 } | 1528 } |
1529 | 1529 |
1530 if (ready) | 1530 if (ready) |
1531 may_trigger_winscrolled(curwin); | 1531 may_trigger_winscrolled(); |
1532 | 1532 |
1533 // Trigger SafeState if nothing is pending. | 1533 // Trigger SafeState if nothing is pending. |
1534 may_trigger_safestate(ready | 1534 may_trigger_safestate(ready |
1535 && !ins_compl_active() | 1535 && !ins_compl_active() |
1536 && !pum_visible()); | 1536 && !pum_visible()); |