# RUSTSEC-2020-0159: Potential segfault in localtime\_r invocations

- Database: RustSec
- Published: 2020-11-10
- Modified: 2026-02-04

## Affected versions

- chrono (crates.io): fixed in 0.4.20

## Description

### Impact

Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

### Workarounds

No workarounds are known.

### References

- [time-rs/time#293](https://github.com/time-rs/time/issues/293)

## References

- https://crates.io/crates/chrono
- https://rustsec.org/advisories/RUSTSEC-2020-0159.html
- https://github.com/chronotope/chrono/issues/499

Page: https://cve.now/RUSTSEC-2020-0159

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
