about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/Linker.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-03-07 04:48:23 +0000
committerbors <bors@rust-lang.org>2022-03-07 04:48:23 +0000
commit2631aeef823a9e16d31f999d3f07001e5fcc4b3d (patch)
tree179d71546b3d7d779dc697e4b65a9adac517cbb4 /compiler/rustc_llvm/llvm-wrapper/Linker.cpp
parent3d1eaf4b6203ab0168da5b99049942385aa753e0 (diff)
parent478cf8b3a455db83473d89f8d856ae309974e4ee (diff)
downloadrust-2631aeef823a9e16d31f999d3f07001e5fcc4b3d.tar.gz
rust-2631aeef823a9e16d31f999d3f07001e5fcc4b3d.zip
Auto merge of #94272 - tavianator:readdir-reclen-for-real, r=cuviper
fs: Don't dereference a pointer to a too-small allocation

ptr::addr_of!((*ptr).field) still requires ptr to point to an
appropriate allocation for its type.  Since the pointer returned by
readdir() can be smaller than sizeof(struct dirent), we need to entirely
avoid dereferencing it as that type.

Link: https://github.com/rust-lang/miri/pull/1981#issuecomment-1048278492
Link: https://github.com/rust-lang/rust/pull/93459#discussion_r795089971
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/Linker.cpp')
0 files changed, 0 insertions, 0 deletions