diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-02-24 12:02:45 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-24 12:02:45 +0530 |
| commit | 353827a044be71ae0ce73c9eba2a361a43cfc61c (patch) | |
| tree | fc865750d4e4a2be4bee71fdc28ea4e408d890d1 /compiler/rustc_query_impl/src | |
| parent | 8acbfe27d62b40186a0566f0e2bc8dbe3da5b407 (diff) | |
| parent | c0c1925774bc07a25bd6a3f07f75abf274183cfb (diff) | |
| download | rust-353827a044be71ae0ce73c9eba2a361a43cfc61c.tar.gz rust-353827a044be71ae0ce73c9eba2a361a43cfc61c.zip | |
Rollup merge of #108391 - sunfishcode:sunfishcode/is-terminal-file-length, r=ChrisDenton
Fix `is_terminal`'s handling of long paths on Windows. As reported in sunfishcode/is-terminal#18, there are situations where `GetFileInformationByHandleEx` can write a file name length that is longer than the provided buffer. To avoid deferencing memory past the end of the buffer, use a bounds-checked function to form a slice to the buffer and handle the out-of-bounds case. This ports the fix from sunfishcode/is-terminal#19 to std's `is_terminal` implementation.
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions
