3 ms·
There are two instances of `unsafe` in Arti. Both are unnecessary. 1. A mmap'd file is checked to be UTF-8 and then assumed never to change on disk to become
by mleonhard 4y ago
There are two instances of `unsafe` in Arti. Both are unnecessary.
1. A mmap'd file is checked to be UTF-8 and then assumed never to change on disk to become non-utf8. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/159 https://gitlab.torproject.org/tpo/core/arti/-/merge_requests...
2. A struct holds a raw pointer so it can report an offset into a string later. It should just store the offset. https://gitlab.torproject.org/tpo/core/arti/-/blob/main/crates/tor-netdoc/src/err.rs https://gitlab.torproject.org/tpo/core/arti/-/blob/main/crat...
The project has the option to use `tokio`, which contains a staggering amount of unsafe code. I hope nobody distributes prebuilt version of Arti that use tokio.