Closed TyPR124 closed 4 years ago
thanks, has less warnings now. I cannot judge the ioctl
part, but I believe you judge this issue better than me
forgot to mention: ran the tests on OSX and the examples (some are broken, but the example itself needs to be fixed, I'll do that another time in master)
I am still working on adding Windows support, but was hoping to get this merged first.
This PR does two things, First, it cleans up all warnings in the build. Second, and more importantly, it fixes a potential soundness issue where a non-mutable buffer was passed to a C function
ioctl
that mutated it. The fix is simply to make the buffer mutable, and pass a mutable reference toioctl
.These changes do not have any impact on functionality other than fixing the soundness issue. That said, the soundness issue was in an OSX-specific function, so it may be worth running
cargo test
on OSX to be sure.