Add an overflow check in truncate implementation for Unix.#63332
Add an overflow check in truncate implementation for Unix.#63332bors merged 2 commits intorust-lang:masterfrom
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
@bors: r+ Thanks! |
|
📌 Commit 3cd9f3f has been approved by |
Add an overflow check in truncate implementation for Unix. Closes rust-lang#63326. cc @alexcrichton
tesuji
left a comment
There was a problem hiding this comment.
Failed in #63354 (comment)
| return cvt_r(|| unsafe { | ||
| ftruncate64(self.0.raw(), size as off64_t) | ||
| }).map(|_| ()); | ||
| { |
There was a problem hiding this comment.
Import use crate::convert::TryInto; only to this block.
|
@bors r- |
|
@bors: r+ |
|
📌 Commit 3adbf63 has been approved by |
Add an overflow check in truncate implementation for Unix. Closes rust-lang#63326. cc @alexcrichton
|
⌛ Testing commit 3adbf63 with merge 26e60ae9583e6110a4ddf9dbd37de1c919fdf4ce... |
|
@bors retry rolled up. |
Rollup of 8 pull requests Successful merges: - #63261 (bump rand in libcore/liballoc test suites) - #63316 (Update rustfmt to 1.4.4) - #63332 (Add an overflow check in truncate implementation for Unix.) - #63342 (Don't use remap-path-prefix in dep-info files.) - #63366 (doc: Fix typo in float from bytes methods) - #63370 (Fix ICE #63364) - #63377 (Improved documentation for compile_error!()) - #63379 (Add test for issue 53096) Failed merges: r? @ghost
|
☔ The latest upstream changes (presumably #63380) made this pull request unmergeable. Please resolve the merge conflicts. |
Closes #63326.
cc @alexcrichton