rust/library/std
Dylan DPC 353827a044
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.
2023-02-24 12:02:45 +05:30
..
benches
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of #108391 - sunfishcode:sunfishcode/is-terminal-file-length, r=ChrisDenton 2023-02-24 12:02:45 +05:30
tests Rollup merge of #105784 - yanns:update_stdarch, r=Amanieu 2023-01-27 12:57:53 +09:00
build.rs Library changes for Apple WatchOS 2022-07-20 08:57:36 +01:00
Cargo.toml Drop llvm14-builtins-abi with compiler_builtins 0.1.87 2023-02-10 16:13:31 -08:00