about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-02-19 08:11:00 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-02-19 08:11:00 -0800
commit9347096d54a983d47996c5f8020dbec04fea81fa (patch)
tree894f92aeeb7a183dfbb67d76ce7bc50a4b4eb85b /src/rustllvm/ExecutionEngineWrapper.cpp
parentace204a74548947914d08a7feca694941106175d (diff)
downloadrust-9347096d54a983d47996c5f8020dbec04fea81fa.tar.gz
rust-9347096d54a983d47996c5f8020dbec04fea81fa.zip
Fix getting/setting huge env vars on windows
On windows, the GetEnvironmentVariable function will return the necessary buffer
size if the buffer provided was too small. This case previously fell through the
checks inside of fill_utf16_buf_and_decode, tripping an assertion in the `slice`
method.

This adds an extra case for when the return value is >= the buffer size, in
which case we assume the return value as the new buffer size and try again.

Closes #12376
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions