Speykious / cve-rs

Blazingly 🔥 fast 🚀 memory vulnerabilities, written in 100% safe Rust. 🦀
Other
3.97k stars 101 forks source link

`cve_rs::transmute` cannot transmute lifetimes #12

Closed workingjubilee closed 7 months ago

workingjubilee commented 7 months ago

Regarding your README:

  • There is, unfortunately, one exception: In our tests, we compare the results of our safe transmute function against the regular std::mem::transmute function. Perhaps somewhat shortsightedly, the standard library implementation is unsafe. Regardless, this is only in our tests - the core library has no unsafe code.

It is possible to use mem::transmute to transmute lifetimes of objects, whereas cve_rs is constrained to only 'static lifetimes for A and B. I do not know whether you intend to relax this bound using further research in Extremely Safe Rust, or whether this was merely something you had overlooked when evaluating the power of mem::transmute, but I felt a clarification (or feature request?) was in order.

Speykious commented 7 months ago

This was fixed in https://github.com/Speykious/cve-rs/commit/f67deb2dd0852149a999ab34debddff0349ef56e

workingjubilee commented 7 months ago

Thanks for the :fire:blazing:rocket:fast:crab: patch!