annotate .gitignore @ 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 776cb5c73d6f
children 6e66a52748d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7016
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 # Unixen: object and executable files.
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 *.o
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 src/vim
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 src/xxd/xxd
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 src/auto/if_perl.c
7380
055a0b587a3e commit https://github.com/vim/vim/commit/36e294c00c784b9ddd05a4fdbea2e331ab2b1ca8
Christian Brabandt <cb@256bit.org>
parents: 7048
diff changeset
6 src/auto/gui_gtk_gresources.c
055a0b587a3e commit https://github.com/vim/vim/commit/36e294c00c784b9ddd05a4fdbea2e331ab2b1ca8
Christian Brabandt <cb@256bit.org>
parents: 7048
diff changeset
7 src/auto/gui_gtk_gresources.h
20231
993d820196b9 patch 8.2.0671: Haiku: compiler warnings
Bram Moolenaar <Bram@vim.org>
parents: 19059
diff changeset
8 src/auto/os_haiku.rdef
10451
aaf009826fbd commit https://github.com/vim/vim/commit/99c5eb4fd755853a134471a63174cec71becbca7
Christian Brabandt <cb@256bit.org>
parents: 9671
diff changeset
9 src/objects/.dirstamp
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
10 src/objects
19059
9b7d0af6e33a patch 8.2.0090: generated files show up in git status
Bram Moolenaar <Bram@vim.org>
parents: 18829
diff changeset
11 src/types.vim
7016
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 # We do need src/auto/configure.
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 src/auto/config.cache
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 src/auto/config.h
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 src/auto/config.log
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 src/auto/config.mk
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 src/auto/config.status
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 src/auto/osdef.h
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 src/auto/link.log
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 src/auto/link.sed
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 src/auto/pathdef.c
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 # Windows
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 *.exe
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 *.idb
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 *.exp
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
28 *.map
7016
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 *.obj
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 *.pdb
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 *.ilk
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 *.sln
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 *.suo
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 *.res
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 *.RES
16451
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 15238
diff changeset
36 vim*.dll
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 15238
diff changeset
37 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
38 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
39 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
40 src/obj*/pathdef.c
7016
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 src/Obj*/pathdef.c
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 gvimext.dll
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 gvimext.lib
12602
9359ed49d375 patch 8.0.1179: Test_popup_and_window_resize() does not always pass
Christian Brabandt <cb@256bit.org>
parents: 11079
diff changeset
44 gvim.lib
7449
2f4a94fe0513 commit https://github.com/vim/vim/commit/89b24fcfc2250d3ccb2f96c61911d9ad0020756b
Christian Brabandt <cb@256bit.org>
parents: 7432
diff changeset
45 runtime/doc/uganda.nsis.txt
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
46 nsis/icons/*
30882
7449da0e006b patch 9.0.0775: MS-Windows: mouse scrolling not supported in the console
Bram Moolenaar <Bram@vim.org>
parents: 29824
diff changeset
47 /vim90/
7449da0e006b patch 9.0.0775: MS-Windows: mouse scrolling not supported in the console
Bram Moolenaar <Bram@vim.org>
parents: 29824
diff changeset
48 .vscode/
7016
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 # NetBeans
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 nbproject/*
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 # Mac OSX
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 src/xxd/xxd.dSYM
18829
eff8d8f72a82 patch 8.1.2402: typos and other small things
Bram Moolenaar <Bram@vim.org>
parents: 18122
diff changeset
55 .DS_Store
7016
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 # All platforms
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 *.rej
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 *.orig
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 *.mo
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 *.swp
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 *~
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 *.pyc
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 *.log
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 src/po/vim.pot
28879
73d490493dc6 patch 8.2.4962: files show up in git status
Bram Moolenaar <Bram@vim.org>
parents: 28025
diff changeset
66 src/tags
73d490493dc6 patch 8.2.4962: files show up in git status
Bram Moolenaar <Bram@vim.org>
parents: 28025
diff changeset
67 /tags
73d490493dc6 patch 8.2.4962: files show up in git status
Bram Moolenaar <Bram@vim.org>
parents: 28025
diff changeset
68 /GPATH
73d490493dc6 patch 8.2.4962: files show up in git status
Bram Moolenaar <Bram@vim.org>
parents: 28025
diff changeset
69 /GTAGS
73d490493dc6 patch 8.2.4962: files show up in git status
Bram Moolenaar <Bram@vim.org>
parents: 28025
diff changeset
70 /GRTAGS
32041
7aeaf20e2ba5 patch 9.0.1352: "ignore" files are outdated
Bram Moolenaar <Bram@vim.org>
parents: 30898
diff changeset
71 nsis/tags
7016
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 # Generated by "make test"
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 src/po/*.ck
16463
4a8a9664817d Update .gitignore
Bram Moolenaar <Bram@vim.org>
parents: 16451
diff changeset
75 src/po/*.desktop
7016
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 src/testdir/mbyte.vim
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 src/testdir/mzscheme.vim
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 src/testdir/lua.vim
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 src/testdir/small.vim
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 src/testdir/tiny.vim
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81 src/testdir/test*.out
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 src/testdir/test*.failed
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 src/testdir/test.log
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 src/testdir/dostmp/*
7432
472684f0cd33 commit https://github.com/vim/vim/commit/40a346dc19a75f2be1b2d491053487cf365dd7d4
Christian Brabandt <cb@256bit.org>
parents: 7380
diff changeset
85 src/testdir/messages
472684f0cd33 commit https://github.com/vim/vim/commit/40a346dc19a75f2be1b2d491053487cf365dd7d4
Christian Brabandt <cb@256bit.org>
parents: 7380
diff changeset
86 src/testdir/viminfo
11079
50459aeb4773 patch 8.0.0428: git and hg see new files after running tests
Christian Brabandt <cb@256bit.org>
parents: 10724
diff changeset
87 src/testdir/opt_test.vim
29824
9fdb54a36a5d patch 9.0.0251: test output shows up in git
Bram Moolenaar <Bram@vim.org>
parents: 28879
diff changeset
88 src/testdir/failed
30898
2ee5b79038f0 patch 9.0.0783: ":!" doesn't do anything but does update the previous command
Bram Moolenaar <Bram@vim.org>
parents: 30882
diff changeset
89 src/testdir/starttime
15238
85705008bb7a Ignore output files from indent tests.
Bram Moolenaar <Bram@vim.org>
parents: 12602
diff changeset
90 runtime/indent/testdir/*.out
18122
0cc306ebc8fe patch 8.1.2056: "make test" for indent files doesn't cause make to fail
Bram Moolenaar <Bram@vim.org>
parents: 17157
diff changeset
91 runtime/indent/testdir/*.fail
7016
8e6a279b5954 Add a .gitignore file, it's very similar to the .hgignore file.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 src/memfile_test
8812
5d8c3d12b288 commit https://github.com/vim/vim/commit/8e77bad3c18245f05a3db3acc566856d30667db8
Christian Brabandt <cb@256bit.org>
parents: 7449
diff changeset
93 src/json_test
9671
5d7216118c8a commit https://github.com/vim/vim/commit/471a8975690af01a1244b28d5b5f978ca623028f
Christian Brabandt <cb@256bit.org>
parents: 8812
diff changeset
94 src/message_test
10724
ae1c6bf22e5f patch 8.0.0252: not properly recognizing word characters between 128 and 255
Christian Brabandt <cb@256bit.org>
parents: 10451
diff changeset
95 src/kword_test
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
96
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
97 # Generated by "make install"
19059
9b7d0af6e33a patch 8.2.0090: generated files show up in git status
Bram Moolenaar <Bram@vim.org>
parents: 18829
diff changeset
98 runtime/doc/doctags
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
99
34346
776cb5c73d6f runtime(vim): include Vim Syntax generator
Christian Brabandt <cb@256bit.org>
parents: 32041
diff changeset
100 # Temporarily generated by "runtime/syntax/generator/make"
776cb5c73d6f runtime(vim): include Vim Syntax generator
Christian Brabandt <cb@256bit.org>
parents: 32041
diff changeset
101 runtime/syntax/generator/generator.err
776cb5c73d6f runtime(vim): include Vim Syntax generator
Christian Brabandt <cb@256bit.org>
parents: 32041
diff changeset
102 runtime/syntax/generator/sanity_check.err
776cb5c73d6f runtime(vim): include Vim Syntax generator
Christian Brabandt <cb@256bit.org>
parents: 32041
diff changeset
103 runtime/syntax/generator/vim.vim.rc
776cb5c73d6f runtime(vim): include Vim Syntax generator
Christian Brabandt <cb@256bit.org>
parents: 32041
diff changeset
104
16574
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
105 # 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: 16463
diff changeset
106 # 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: 16463
diff changeset
107 src/shadow
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
108 src/shadow-*
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
109 src/runtime
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
110 src/pixmaps
cabfcd0f8012 patch 8.1.1290: .hgignore and .gitignore are either distributed or in git
Bram Moolenaar <Bram@vim.org>
parents: 16463
diff changeset
111
28025
18892907cef7 patch 8.2.4537: output from linter and language server shows up in git
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
112 # 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: 16463
diff changeset
113 src/cscope.out
28025
18892907cef7 patch 8.2.4537: output from linter and language server shows up in git
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
114
18892907cef7 patch 8.2.4537: output from linter and language server shows up in git
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
115 # Linter/language server files
18892907cef7 patch 8.2.4537: output from linter and language server shows up in git
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
116 /.cache/clangd/
18892907cef7 patch 8.2.4537: output from linter and language server shows up in git
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
117 /.ccls-cache/
18892907cef7 patch 8.2.4537: output from linter and language server shows up in git
Bram Moolenaar <Bram@vim.org>
parents: 24689
diff changeset
118 /compile_commands.json