Clarify description for issue found in 'libsbc'

This commit is contained in:
Youngsuk Kim
2021-01-25 09:39:39 -05:00
committed by GitHub
parent 735a9dbbe2
commit 0850c3b0d3

View File

@@ -11,9 +11,9 @@ informational = "unsound"
patched = [">= 0.1.5"]
```
# Minor soundness issue with Decoder's Send trait
# `Decoder<R>` can carry `R: !Send` to other threads
Affected versions of this crate implements `Send` for `Decoder<R>` for any `R: Read`. This allows to use `R: !Send` in `Decoder<R>` to send a non-Send type to another thread.
Affected versions of this crate implements `Send` for `Decoder<R>` for any `R: Read`. This allows `Decoder<R>` to contain `R: !Send` and carry (move) it to another thread.
This can result in undefined behavior such as memory corruption from data race on `R`, or dropping `R = MutexGuard<_>` from a thread that didn't lock the mutex.