annotate .hgignore @ 34454:f8fed6c8bb60 v9.1.0143

patch 9.1.0143: [security]: autocmd causes use-after-free in set_curbuf() Commit: https://github.com/vim/vim/commit/55f8bba73be5f9c3a5a4d0d6c5f56e65f2c7d3fc Author: Christian Brabandt <cb@256bit.org> Date: Wed Feb 28 23:32:00 2024 +0100 patch 9.1.0143: [security]: autocmd causes use-after-free in set_curbuf() Problem: [security]: autocmd cause use-after-free in set_curbuf() (kawarimidoll) Solution: check side-effect of BufLeave autocommand, when the number of windows changed, close windows containing buffers that will be wiped, if curbuf changed unexpectedly make sure b_nwindows is decremented otherwise it cannot be wiped set_curbuf() already makes some efforts to ensure the BufLeave autocommands do not cause issues. However there are still 2 issues that are not taken care of: 1) If a BufLeave autocommand opens a new window containing the same buffer as that is going got be closed in close_buffer() a bit later, we suddenly have another window open, containing a free'd buffer. So we must check if the number of windows changed and if it does (and the current buffer is going to be wiped (according to the 'bufhidden' setting), let's immediately close all windows containing the current buffer using close_windows() 2) If a BufLeave autocommand changes our current buffer (displays it in the current window), buf->b_nwindow will be incremented. As part of set_curbuf() we will however enter another buffer soon, which means, the newly created curbuf will have b_nwindows still have set, even so the buffer is no longer displayed in a window. This causes later problems, because it will no longer be possible to wipe such a buffer. So just before entering the final buffer, check if the curbuf changed when calling the BufLeave autocommand and if it does (and curbuf is still valid), decrement curbuf->b_nwindows. Both issues can be verified using the provided test (however the second issue only because such an impacted buffer won't be wiped, causing futher issues in later tests). fixes: #13839 closes: #14104 Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Wed, 28 Feb 2024 23:45:03 +0100
parents 7aeaf20e2ba5
children 6e66a52748d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 syntax: glob
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 # Unixen: object and executable files.
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 *.o
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 src/vim
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 src/xxd/xxd
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 src/auto/if_perl.c
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 src/auto/gui_gtk_gresources.c
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 src/auto/gui_gtk_gresources.h
32041
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
10 src/auto/os_haiku.rdef
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 src/objects/.dirstamp
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 src/objects
19093
af70e0c2b3cd patch 8.2.0107: hgignore is out of sync from gitignore
Bram Moolenaar <Bram@vim.org>
parents: 17157
diff changeset
13 src/types.vim
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 # We do need src/auto/configure.
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 src/auto/config.cache
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 src/auto/config.h
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 src/auto/config.log
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 src/auto/config.mk
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 src/auto/config.status
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 src/auto/osdef.h
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 src/auto/link.log
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 src/auto/link.sed
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 src/auto/pathdef.c
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 # Windows
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 *.exe
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 *.idb
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 *.exp
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 *.map
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 *.obj
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 *.pdb
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 *.ilk
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 *.sln
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 *.suo
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 *.res
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 *.RES
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 vim*.dll
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 vim*.lib
17157
bbd454d155a9 patch 8.1.1578: MS-Windows: pathdef.c should depend on build options
Bram Moolenaar <Bram@vim.org>
parents: 16606
diff changeset
40 src/dobj*/pathdef.c
bbd454d155a9 patch 8.1.1578: MS-Windows: pathdef.c should depend on build options
Bram Moolenaar <Bram@vim.org>
parents: 16606
diff changeset
41 src/gobj*/pathdef.c
bbd454d155a9 patch 8.1.1578: MS-Windows: pathdef.c should depend on build options
Bram Moolenaar <Bram@vim.org>
parents: 16606
diff changeset
42 src/obj*/pathdef.c
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 src/Obj*/pathdef.c
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 gvimext.dll
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 gvimext.lib
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 gvim.lib
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 runtime/doc/uganda.nsis.txt
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 nsis/icons/*
32041
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
49 /vim90/
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
50 .vscode/
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 # NetBeans
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 nbproject/*
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 # Mac OSX
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 src/xxd/xxd.dSYM
32041
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
57 .DS_Store
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 # All platforms
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 *.rej
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 *.orig
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 *.mo
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 *.swp
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 *~
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 *.pyc
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 *.log
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 src/po/vim.pot
32041
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
68 src/tags
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
69 /tags
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
70 /GPATH
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
71 /GTAGS
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
72 /GRTAGS
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
73 nsis/tags
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 # Generated by "make test"
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 src/po/*.ck
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 src/po/*.desktop
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 src/testdir/mbyte.vim
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 src/testdir/mzscheme.vim
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 src/testdir/lua.vim
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 src/testdir/small.vim
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 src/testdir/tiny.vim
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 src/testdir/test*.out
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 src/testdir/test*.failed
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 src/testdir/test.log
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 src/testdir/dostmp/*
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 src/testdir/messages
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 src/testdir/viminfo
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 src/testdir/opt_test.vim
32041
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
90 src/testdir/failed
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
91 src/testdir/starttime
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92 runtime/indent/testdir/*.out
32041
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
93 runtime/indent/testdir/*.fail
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94 src/memfile_test
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95 src/json_test
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
96 src/message_test
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
97 src/kword_test
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
98
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
99 # Generated by "make install"
19093
af70e0c2b3cd patch 8.2.0107: hgignore is out of sync from gitignore
Bram Moolenaar <Bram@vim.org>
parents: 17157
diff changeset
100 runtime/doc/doctags
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
101
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
102 # Generated by "make shadow". The directory names could be anything but we
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
103 # restrict them to shadow (the default) or shadow-*
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
104 src/shadow
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
105 src/shadow-*
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
106 src/runtime
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
107 src/pixmaps
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
108
32041
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
109 # other files possibly created by tools
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110 src/cscope.out
32041
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
111
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
112 # Linter/language server files
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
113 /.cache/clangd/
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
114 /.ccls-cache/
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
115 /compile_commands.json