Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the call to localtime_r unsound in this lib? #1

Closed
namespaceYcZ opened this issue Aug 5, 2022 · 2 comments
Closed

Is the call to localtime_r unsound in this lib? #1

namespaceYcZ opened this issue Aug 5, 2022 · 2 comments
Labels
question Further information is requested

Comments

@namespaceYcZ
Copy link

According to the issue of chrono, the call to localtime_r may be unsound. I'm not quite familiar to rust and cpp coding, just be curios about this.
(根据chrono库的一个issue,调用libc的localtime_r函数可能是unsound的,不知道fastdate这个库会受这个问题的影响吗?我对Rust和C++都不是很熟悉,就是比较好奇)

@zhuxiujia
Copy link
Member

According to the issue of chrono, the call to localtime_r may be unsound. I'm not quite familiar to rust and cpp coding, just be curios about this. (根据chrono库的一个issue,调用libc的localtime_r函数可能是unsound的,不知道fastdate这个库会受这个问题的影响吗?我对Rust和C++都不是很熟悉,就是比较好奇)

if localtime_r not thread-safe,but. in fastdate is thread-safe.
Because fastdate only once uses it to call the cache time zone once.

@zhuxiujia zhuxiujia added the question Further information is requested label Aug 6, 2022
@pinkforest
Copy link

chrono 0.4.20 has localtime_r RiR (Rewritten in Rust) 🥳

We've updated patched ver here https://rustsec.org/advisories/RUSTSEC-2020-0159

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants