Unratedcrates.ioPublished
setlocale and TextDomain::init are unsound as they access environment with no synchronization
- Affected
- crates.io gettext-rs >= 0.0.0-0, < 0.8.0
- Fixed in
- 0.8.0· Vendor fix available
- Issue
- `setlocale` and `TextDomain::init` are unsound and may allow safe code to exhibit undefined behavior when called in a multi-threaded program. The flaw is fixed in 0.8.0 by marking these functions `unsafe` and documenting the conditions under which they can be called safely.
Recommended action: Upgrade to 0.8.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.