mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
353827a044
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. |
||
---|---|---|
.. | ||
alloc | ||
backtrace@07872f28cd | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@a0c30f3e3c | ||
test | ||
unwind |