Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase to v2.44.0-rc2 #4828

Merged
merged 371 commits into from
Feb 20, 2024
Merged
Changes from 1 commit
Commits
Show all changes
371 commits
Select commit Hold shift + click to select a range
51cb720
init: do parse _all_ core.* settings early
dscho Sep 8, 2021
bc3b0db
Enable the built-in FSMonitor as an experimental feature
dscho Mar 5, 2021
e199612
hash-object --stdin: verify that it works with >4GB/LLP64
PhilipOakley Dec 6, 2021
e07d57d
vcxproj: allow building with `NO_PERL` again
dscho Mar 29, 2022
bd35ae2
hash-object: add another >4GB/LLP64 test case
PhilipOakley Dec 6, 2021
71aba2a
setup: properly use "%(prefix)/" when in WSL
derrickstolee Apr 13, 2022
adf4378
vcxproj: require C11
dscho Jun 28, 2022
58b6d48
hash-object: add a >4GB/LLP64 test case using filtered input
PhilipOakley Dec 7, 2021
78dbbc1
compat/mingw.c: do not warn when failing to get owner
derrickstolee Apr 13, 2022
5f78ab9
mingw: $env:TERM="xterm-256color" for newer OSes
rkitover Apr 12, 2022
5457bef
winansi: check result and Buffer before using Name
1480c1 May 28, 2022
ce8d5b7
Add config option `windows.appendAtomically`
sunzhuoshi Jan 15, 2022
cd22a6d
mingw: change core.fsyncObjectFiles = 1 by default
dscho Sep 4, 2017
f59659a
vcxproj: ignore the `-pedantic` option
dscho Jun 28, 2022
4d9f4f7
vcxproj: include reftable when committing `.vcxproj` files
dscho Jun 28, 2022
8cf7664
vcxproj: handle libreftable_test, too
dscho Jun 28, 2022
08f032c
vcxproj: avoid escaping double quotes in the defines
dscho Jun 28, 2022
3644fa4
ci: adjust Azure Pipeline for `runs_on_pool`
dscho Jul 9, 2022
e3881d4
ci: stop linking the `prove` cache
dscho Jul 9, 2022
242a9b5
ci: reinstate Azure Pipelines support
dscho Feb 11, 2021
53167ac
azure-pipeline: drop the `GETTEXT_POISON` job
dscho Mar 29, 2022
2f5d536
azure-pipeline: stop hard-coding `apt-get` calls
dscho Mar 29, 2022
68286a8
azure-pipeline: drop the code to write to/read from a file share
dscho Jul 9, 2022
fc13951
azure-pipeline: use partial clone/parallel checkout to initialize min…
dscho Jul 9, 2022
fa9b79d
azure-pipeline: downcase the job name of the `Linux32` job
dscho Jul 9, 2022
046ac62
azure-pipeline: run static-analysis on jammy
ttaylorr Feb 8, 2021
0699395
MinGW: link as terminal server aware
rimrul Jul 10, 2022
13b3fa7
Fix Windows version resources
Mortein Nov 2, 2022
f9fa3f5
http: optionally load libcurl lazily
dscho May 6, 2023
f3ba177
http: support lazy-loading libcurl also on Windows
dscho May 7, 2023
b69bdb3
config.mak.uname: add support for clangarm64
dennisameling Oct 4, 2022
c1b66ba
http: when loading libcurl lazily, allow for multiple SSL backends
dscho May 7, 2023
40f4e01
bswap.h: add support for built-in bswap functions
dennisameling Oct 4, 2022
0c8bf65
ci: create clangarm64-build.yml
dennisameling Oct 4, 2022
a53bda1
status: fix for old-style submodules with commondir
sceptical-coder Oct 28, 2022
1322cfc
windows: skip linking `git-<command>` for built-ins
dscho Jan 27, 2023
5a79d8f
windows: fix Repository>Explore Working Copy
dscho Mar 21, 2023
e6e865e
mingw: do load libcurl dynamically by default
dscho May 7, 2023
fd9b23f
Add a GitHub workflow to verify that Git/Scalar work in Nano Server
dscho Nov 2, 2022
6f0132e
mingw: suggest `windows.appendAtomically` in more cases
dsl101 Jul 28, 2023
79cf7b2
win32: use native ANSI sequence processing, if possible
dscho Nov 22, 2023
1c85e4f
git.rc: include winuser.h
rimrul Dec 2, 2023
0bc7655
Merge 'remote-hg-prerequisites' into HEAD
dscho Jun 8, 2018
269387d
Merge branch 'drive-prefix'
dscho Jun 8, 2018
37aedfb
build(deps): bump microsoft/setup-msbuild from 1 to 2
dependabot[bot] Feb 12, 2024
dcd9ffb
Merge branch 'dont-clean-junctions'
dscho Jul 30, 2019
4537454
Merge branch 'msys2-python'
dscho May 31, 2019
7ae99d2
Merge branch 'mimalloc-v2.0.9'
dscho Sep 8, 2022
aece7d2
Merge pull request #2375 from assarbad/reintroduce-sideband-config
dscho Oct 30, 2019
3b68b42
Merge pull request #2405 from dscho/mingw-setsockopt
dscho Nov 25, 2019
a326854
Merge pull request #2449 from dscho/mingw-getcwd-and-symlinks
dscho Jan 3, 2020
cd68411
Merge pull request #2488 from bmueller84/master
dscho Jan 22, 2020
82111de
Merge pull request #2501 from jeffhostetler/clink-debug-curl
dscho Jan 30, 2020
31da232
Merge pull request #2504 from dscho/access-repo-via-junction
dscho Feb 1, 2020
cd5d4f3
Merge pull request #2506 from dscho/issue-2283
dscho Feb 11, 2020
ff5e688
Merge pull request #2535 from dscho/schannel-revoke-best-effort
dscho Mar 4, 2020
ab25d75
Merge pull request #2618 from dscho/avoid-d/f-conflict-in-vs/master
dscho May 9, 2020
1f36758
Merge 'add-p-many-files'
dscho Jun 8, 2018
aa1e8fc
Merge pull request #2730 from dscho/crlf-aware-git-add-i
dscho Jul 2, 2020
73232a1
Merge pull request #2714 from lbonanomi/crlf-scissors
dscho Jul 3, 2020
49f6722
Merge pull request #2655 from jglathe/jg/t0014_trace_extra_info
dscho Oct 9, 2020
beecc64
Merge 'git-gui/js/intent-to-add'
dscho Oct 18, 2020
1121119
Merge pull request #2974 from derrickstolee/maintenance-and-headless
dscho Jan 11, 2021
c3dedaf
cmake: install headless-git. (#4338)
dscho Mar 13, 2023
c83eb7f
Merge pull request #2351 from PhilipOakley/vcpkg-tip
dscho Oct 7, 2019
35271cc
Merge pull request #2915 from dennisameling/windows-arm64-support
dscho Dec 9, 2020
4ecf473
Merge pull request #3327 from dennisameling/fix-host-cpu
dscho Jul 19, 2021
d0129f2
Merge pull request #3150 from dscho/ci-cache-vcpkg-artifacts-g4w
dscho Mar 28, 2021
bd48308
Merge pull request #3165 from dscho/increase-allowed-length-of-interp…
dscho Apr 3, 2021
35f1c9f
Merge pull request #3220 from dscho/there-is-no-vs/master-anymore
dscho May 17, 2021
eda5777
Merge pull request #3293 from pascalmuller/http-support-automatically…
dscho Jun 24, 2021
fd2918f
Merge pull request #3349 from vdye/feature/ci-subtree-tests
dscho Aug 10, 2021
4f9df8e
Merge pull request #3306 from PhilipOakley/vs-sln
dscho Oct 12, 2021
5386582
Merge pull request #3417 from dscho/initialize-core.symlinks-earlier
dscho Oct 13, 2021
34f2c1b
Merge branch 'mark-v4-fsmonitor-experimental' into try-v4-fsmonitor
jeffhostetler Sep 29, 2021
92a182c
Merge pull request #3533 from PhilipOakley/hashliteral_t
dscho Dec 15, 2021
826f53a
Merge pull request #3791: Various fixes around `safe.directory`
derrickstolee Apr 13, 2022
e03a1bb
Merge pull request #3751 from rkitover/native-term
dscho Apr 21, 2022
a17df44
Merge pull request #3875 from 1480c1/wine/detect_msys_tty
dscho May 30, 2022
75f4915
Merge branch 'optionally-dont-append-atomically-on-windows'
dscho Jun 23, 2022
15e854a
Merge branch 'fsync-object-files-always'
dscho Oct 11, 2018
23b09ba
Merge branch 'ci-fixes'
dscho Feb 11, 2021
52cde3a
Merge pull request #3942 from rimrul/mingw-tsaware
dscho Jul 27, 2022
c337429
Fix Windows version resources (#4092)
dscho Nov 3, 2022
cfb607f
Merge branch 'builtin-swap-functions'
dscho Nov 23, 2022
b020e8c
Add support for CLANGARM64 target (#3916)
dscho Oct 28, 2022
4ed5b33
Fix global repository field not being cleared (#4083)
dscho Dec 20, 2022
cfa06d3
Skip linking the "dashed" `git-<command>`s for built-ins (#4252)
dscho Jan 31, 2023
7d031e4
Git GUI: fix Repository>Explore Working Copy (#4357)
dscho Mar 21, 2023
02c9114
Lazy load libcurl, allowing for an SSL/TLS backend-specific libcurl (…
dscho May 15, 2023
ad08269
Merge branch 'nano-server'
dscho Aug 7, 2023
b45d469
Additional error checks for issuing the windows.appendAtomically warn…
dscho Aug 7, 2023
c5a7e9f
win32: use native ANSI sequence processing, if possible (#4700)
dscho Dec 2, 2023
a618349
ARM64: Embed manifest properly (#4718)
dscho Dec 7, 2023
58bb1b2
dependabot: help keeping GitHub Actions versions up to date (#4792)
rimrul Feb 7, 2024
14c4100
Win32: make FILETIME conversion functions public
kblees Jul 6, 2013
d1f56cd
Win32: dirent.c: Move opendir down
kblees Sep 8, 2013
120f639
mingw: make the dirent implementation pluggable
kblees Sep 8, 2013
5a7542d
Merge branch 'ready-for-upstream'
dscho Oct 11, 2018
1074cd0
Win32: make the lstat implementation pluggable
kblees Sep 8, 2013
fb48846
mingw: add infrastructure for read-only file system level caches
kblees Sep 8, 2013
3a7dbd8
fscache: add key for GIT_TRACE_FSCACHE
jeffhostetler Jan 24, 2017
af07154
mingw: add a cache below mingw's lstat and dirent implementations
kblees Oct 1, 2013
5ee40f7
fscache: remember not-found directories
jeffhostetler Dec 13, 2016
e6b3fe6
fscache: load directories only once
kblees Jun 24, 2014
df56507
fscache: add a test for the dir-not-found optimization
dscho Jan 25, 2017
a0518a9
add: use preload-index and fscache for performance
jeffhostetler Nov 22, 2016
99dae94
dir.c: make add_excludes aware of fscache during status
jeffhostetler Nov 1, 2017
8785376
fscache: make fscache_enabled() public
jeffhostetler Dec 20, 2017
fd83736
dir.c: regression fix for add_excludes with fscache
jeffhostetler Dec 20, 2017
f5e2ecf
fetch-pack.c: enable fscache for stats under .git/objects
Nov 22, 2017
b0e415f
checkout.c: enable fscache for checkout again
Jan 30, 2018
79b01d0
Enable the filesystem cache (fscache) in refresh_index().
benpeart Sep 7, 2018
3446126
fscache: use FindFirstFileExW to avoid retrieving the short name
benpeart Oct 23, 2018
15271c3
status: disable and free fscache at the end of the status command
benpeart Nov 1, 2018
4d545f8
mem_pool: add GIT_TRACE_MEMPOOL support
benpeart Oct 4, 2018
ad803f7
fscache: fscache takes an initial size
benpeart Nov 2, 2018
a259c8a
fscache: update fscache to be thread specific instead of global
benpeart Oct 4, 2018
1912848
fscache: add GIT_TEST_FSCACHE support
benpeart Oct 4, 2018
d6fe7f0
fscache: add fscache hit statistics
benpeart Sep 25, 2018
4fae199
fscache: teach fscache to use mempool
benpeart Nov 2, 2018
c5e04c7
fscache: make fscache_enable() thread safe
benpeart Nov 16, 2018
b954d02
fscache: teach fscache to use NtQueryDirectoryFile
benpeart Nov 15, 2018
75b30d8
fscache: remember the reparse tag for each entry
dscho Dec 11, 2018
818865b
git-gui: provide question helper for retry fallback on Windows
hvoigt Feb 21, 2010
de10ad7
fscache: implement an FSCache-aware is_mount_point()
dscho Dec 11, 2018
2a53be8
git gui: set GIT_ASKPASS=git-gui--askpass if not set yet
dscho Jul 23, 2010
8cdf01b
unpack-trees: enable fscache for sparse-checkout
derrickstolee Jun 12, 2019
fa0e60a
clean: make use of FSCache
dscho Dec 11, 2018
0a7ed7f
gitk: Unicode file name support
kblees Feb 4, 2012
5b853a7
git-gui--askyesno: fix funny text wrapping
dscho Sep 20, 2017
d832848
gitk: Use an external icon file on Windows
sschuberth Jul 22, 2012
bc2cc2f
git-gui--askyesno: allow overriding the window title
dscho Sep 20, 2017
01a4d03
gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6
dscho Feb 16, 2016
261e4f5
git-gui--askyesno (mingw): use Git for Windows' icon, if available
dscho Sep 20, 2017
7dadce9
Merge 'git-gui' into HEAD
dscho Jun 7, 2018
577173a
gitk: make the "list references" default window width wider
sidecut Jan 21, 2016
9015211
Merge branch 'git-gui-askyesno'
dscho Jun 8, 2018
766b343
Merge branch 'fscache'
dscho Nov 15, 2018
c368276
Merge pull request #994 from jeffhostetler/jeffhostetler/fscache_nfd
dscho Jun 8, 2018
48d1954
Merge pull request #971 from jeffhostetler/jeffhostetler/add_preload_…
dscho Jun 8, 2018
7855f4a
Merge 'gitk' into HEAD
dscho Jun 7, 2018
c4f88ba
Merge pull request #1344 from jeffhostetler/perf_add_excludes_with_fs…
dscho Jun 8, 2018
ad1aceb
Merge pull request #1426 from atetubou/fetch_pack
dscho Jun 8, 2018
dd35212
Merge pull request #1468 from atetubou/fscache_checkout_flush
dscho Oct 12, 2018
c661dfc
Merge pull request #1827 from benpeart/fscache_refresh_index
dscho Sep 27, 2018
cb29ece
Merge pull request #1908 from benpeart/FindFirstFileEx-gfw
dscho Nov 5, 2018
03d5cf8
Merge pull request #1909 from benpeart/free-fscache-after-status-gfw
dscho Nov 5, 2018
8a0750a
Merge pull request #1911 from benpeart/git_test_fscache-gfw
dscho Nov 5, 2018
6c582dd
Merge pull request #1910 from benpeart/fscache_statistics-gfw
dscho Nov 16, 2018
d8fb770
Merge remote-tracking branch 'benpeart/fscache-per-thread-gfw'
dscho Nov 16, 2018
ac390cd
Merge pull request #1934 from benpeart/fscache-thread-safe-enable-gfw
dscho Nov 26, 2018
84a97ca
Merge pull request #1937 from benpeart/fscache-NtQueryDirectoryFile-gfw
dscho Nov 27, 2018
18570ae
Merge branch 'fscache-and-sparse-checkout'
derrickstolee Jun 18, 2019
ffe2c64
pack-objects (mingw): demonstrate a segmentation fault with large deltas
vangdfang Jan 9, 2014
4915d0f
Merge branch 'dont-clean-junctions-fscache'
dscho Jul 23, 2019
8bbd305
mingw: Support `git_terminal_prompt` with more terminals
kblees Mar 19, 2015
76c2eac
mingw: support long paths
kblees Jul 28, 2015
9a13e18
compat/terminal.c: only use the Windows console if bash 'read -r' fails
kblees May 9, 2015
b2fdffe
Win32: fix 'lstat("dir/")' with long paths
kblees Jul 4, 2014
c58b002
mingw (git_terminal_prompt): do fall back to CONIN$/CONOUT$ method
dscho Feb 23, 2018
df1e5e2
win32(long path support): leave drive-less absolute paths intact
dscho Sep 6, 2023
2c1ce5e
compat/fsmonitor/fsm-*-win32: support long paths
jeffhostetler Mar 25, 2022
3907a64
clean: suggest using `core.longPaths` if paths are too long to remove
mathstuf Apr 22, 2022
272044b
Unbreak interactive GPG prompt upon signing
dscho Sep 6, 2016
23d5c30
strbuf_readlink: don't call readlink twice if hint is the exact link …
kblees May 11, 2015
3698a7a
strbuf_readlink: support link targets that exceed PATH_MAX
kblees May 11, 2015
8d475d0
lockfile.c: use is_dir_sep() instead of hardcoded '/' checks
kblees May 11, 2015
972c276
Win32: don't call GetFileAttributes twice in mingw_lstat()
kblees May 12, 2015
975782b
Win32: implement stat() with symlink support
kblees May 15, 2015
63a3e18
Win32: remove separate do_lstat() function
kblees May 11, 2015
c8b7ebf
Win32: let mingw_lstat() error early upon problems with reparse points
kblees May 23, 2015
bd4102e
mingw: teach fscache and dirent about symlinks
kblees Jan 10, 2017
fddfdc5
Win32: lstat(): return adequate stat.st_size for symlinks
kblees May 15, 2015
cd4d60e
Win32: factor out retry logic
kblees May 19, 2015
33399e6
Win32: change default of 'core.symlinks' to false
kblees May 23, 2015
4c22343
Win32: add symlink-specific error codes
kblees May 15, 2015
f656a8c
Win32: mingw_unlink: support symlinks to directories
kblees May 23, 2015
e8328f0
Win32: mingw_rename: support renaming symlinks
kblees May 19, 2015
533ae66
Win32: mingw_chdir: change to symlink-resolved directory
kblees May 23, 2015
dbef513
Win32: implement readlink()
kblees May 23, 2015
250218a
mingw: lstat: compute correct size for symlinks
billziss-gh May 28, 2020
f5575ef
Win32: implement basic symlink() functionality (file symlinks only)
kblees May 23, 2015
17d2538
Win32: symlink: add support for symlinks to directories
kblees May 23, 2015
88251bc
mingw: introduce code to detect whether we're inside a Windows container
ZCube Apr 23, 2018
364eb4f
mingw: try to create symlinks without elevated permissions
dscho May 30, 2017
288df17
mingw: when running in a Windows container, try to rename() harder
ZCube Apr 23, 2018
6f48c2a
mingw: emulate stat() a little more faithfully
dscho Mar 2, 2020
44d74b2
mingw: move the file_attr_to_st_mode() function definition
ZCube Apr 23, 2018
a17c710
mingw: special-case index entries for symlinks with buggy size
dscho Jun 4, 2020
158ce8b
Win32: symlink: move phantom symlink creation to a separate function
piscisaureus Oct 26, 2018
54085a4
Introduce helper to create symlinks that knows about index_state
dscho Feb 11, 2019
2f03de8
mingw: explicitly specify with which cmd to prefix the cmdline
dscho Jul 20, 2017
96236be
mingw: allow to specify the symlink type in .gitattributes
piscisaureus Oct 26, 2018
22b7f9c
mingw: when path_lookup() failed, try BusyBox
dscho Jul 20, 2017
4b4712e
mingw: Windows Docker volumes are *not* symbolic links
dscho Apr 23, 2018
2ee1fe2
mingw: work around rename() failing on a read-only file
dsl101 Jul 28, 2023
7ca143e
Win32: symlink: add test for `symlink` attribute
piscisaureus Oct 26, 2018
c3f1c16
test-lib: avoid unnecessary Perl invocation
dscho Aug 5, 2017
5d5bf57
test-tool: learn to act as a drop-in replacement for `iconv`
dscho Jul 20, 2017
fca41ad
tests(mingw): if `iconv` is unavailable, use `test-helper --iconv`
dscho Jul 20, 2017
ea80e76
gitattributes: mark .png files as binary
dscho Oct 11, 2018
7dfaefb
tests: move test PNGs into t/lib-diff/
dscho Aug 5, 2017
1a48af1
tests: only override sort & find if there are usable ones in /usr/bin/
dscho Jul 17, 2017
d11c95b
tests: use the correct path separator with BusyBox
dscho Nov 19, 2018
3bcdfdb
mingw: only use Bash-ism `builtin pwd -W` when available
dscho Jun 29, 2017
029143c
tests (mingw): remove Bash-specific pwd option
dscho Jun 30, 2017
64ed077
test-lib: add BUSYBOX prerequisite
dscho Jul 19, 2017
58098ea
t5003: use binary file from t/lib-diff/
dscho Aug 5, 2017
bf4cb0c
t5532: workaround for BusyBox on Windows
dscho Jul 21, 2017
b5a985c
t5605: special-case hardlink test for BusyBox-w32
dscho Jul 21, 2017
14d76f9
t5813: allow for $PWD to be a Windows path
dscho Jul 5, 2017
d5950c6
t9200: skip tests when $PWD contains a colon
dscho Jul 7, 2017
6207783
mingw: add a Makefile target to copy test artifacts
dscho Jul 19, 2017
6847cd3
mingw: optionally enable wsl compability file mode bits
swigger Jun 7, 2023
efe974c
mingw: kill child processes in a gentler way
dscho May 17, 2017
5e42c55
mingw: really handle SIGINT
dscho Apr 22, 2018
e545d58
mingw: do not call xutftowcs_path in mingw_mktemp
neerajsi-msft Oct 27, 2021
d90c212
Partially un-revert "editor: save and reset terminal after calling ED…
dscho Nov 25, 2021
897d509
reset: reinstate support for the deprecated --stdin option
dscho Dec 10, 2019
b793692
fsmonitor: reintroduce core.useBuiltinFSMonitor
vdye Apr 4, 2022
38e9da0
Describe Git for Windows' architecture [no ci]
dscho Feb 13, 2023
2c331d3
Modify the Code of Conduct for Git for Windows
dscho Oct 11, 2019
833f3c3
CONTRIBUTING.md: add guide for first-time contributors
derrickstolee Mar 1, 2018
2d8a358
README.md: Add a Windows-specific preamble
dscho Jan 10, 2014
f1b298f
Add an issue template
shiftkey Feb 18, 2016
7fef714
Modify the GitHub Pull Request template (to reflect Git for Windows)
Dec 22, 2017
d9b9b80
.github: Add configuration for the Sentiment Bot
dscho Feb 20, 2018
68025ac
Add a GitHub workflow to monitor component updates
dscho Sep 29, 2020
3b32cf5
Document how $HOME is set on Windows
alejandro5042 Mar 9, 2018
ddf1017
dependabot: help keeping GitHub Actions versions up to date
dscho Feb 6, 2024
6b80c82
SECURITY.md: document Git for Windows' policies
dscho Aug 23, 2019
37f6235
Merge branch 'gitk-and-git-gui-patches'
dscho Oct 11, 2018
b800031
Merge branch 'long-paths'
dscho Nov 15, 2018
289f96c
Merge branch 'fix-v4-fsmonitor-long-paths' into try-v4-fsmonitor
jeffhostetler Sep 29, 2021
a59e572
Merge pull request #3817 from mathstuf/name-too-long-advice
dscho Apr 22, 2022
f5a20e2
Merge branch 'msys2'
dscho Nov 15, 2018
3eee535
Merge branch 'kblees/kb/symlinks'
dscho Nov 15, 2018
abca9ce
Merge 'docker-volumes-are-no-symlinks'
dscho Oct 12, 2018
498008f
mingw: try resetting the read-only bit if rename fails (#4527)
dscho Aug 7, 2023
3554a45
Merge pull request #1897 from piscisaureus/symlink-attr
dscho Oct 31, 2018
6041e4d
Merge branch 'busybox-w32'
dscho Feb 7, 2019
e2cbbd2
Merge branch 'wsl-file-mode-bits'
dscho Aug 7, 2023
4be4439
Merge pull request #1170 from dscho/mingw-kill-process
dscho Oct 11, 2018
b2fd108
Merge pull request #3492 from dscho/ns/batched-fsync
vdye Oct 28, 2021
2f9b08a
Merge branch 'un-revert-editor-save-and-reset'
dscho Jan 15, 2022
21124b1
Merge branch 'phase-out-reset-stdin'
dscho Jun 8, 2018
13c1e6a
Merge branch 'deprecate-core.useBuiltinFSMonitor'
dscho Jan 24, 2023
575dd21
Merge pull request #2837 from dscho/monitor-component-updates
dscho Oct 7, 2020
0db3af6
Merge 'readme' into HEAD
dscho Jun 7, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
winansi: check result and Buffer before using Name
NtQueryObject under Wine can return a success but fill out no name.
In those situations, Wine will set Buffer to NULL, and set result to
the sizeof(OBJECT_NAME_INFORMATION).

Running a command such as

echo "$(git.exe --version 2>/dev/null)"

will crash due to a NULL pointer dereference when the code attempts to
null terminate the buffer, although, weirdly, removing the subshell or
redirecting stdout to a file will not trigger the crash.

Code has been added to also check Buffer and Length to ensure the check
is as robust as possible due to the current behavior being fragile at
best, and could potentially change in the future

This code is based on the behavior of NtQueryObject under wine and
reactos.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
  • Loading branch information
1480c1 authored and dscho committed Feb 20, 2024
commit 5457beff89b1075bd798771df293fb8779e48f14
3 changes: 3 additions & 0 deletions compat/winansi.c
Original file line number Diff line number Diff line change
@@ -573,6 +573,9 @@ static void detect_msys_tty(int fd)
if (!NT_SUCCESS(NtQueryObject(h, ObjectNameInformation,
buffer, sizeof(buffer) - 2, &result)))
return;
if (result < sizeof(*nameinfo) || !nameinfo->Name.Buffer ||
!nameinfo->Name.Length)
return;
name = nameinfo->Name.Buffer;
name[nameinfo->Name.Length / sizeof(*name)] = 0;