-
Notifications
You must be signed in to change notification settings - Fork 1.2k
last: avoid out of bounds array access #2843
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
Conversation
==2088193==ERROR: AddressSanitizer: stack-buffer-overflow on address 0xffffffffbfda at pc 0x0000004ffa90 bp 0xffffffffacd0 sp 0xffffffffad78 Address 0xffffffffbfda is located in stack of thread T0 at offset 154 in frame This frame has 2 object(s): |
We should instead check the return value of |
Done! |
Thanks. Looking at the whole of util-linux, it seems no return values of |
Yeah. need to fix it in this PR? |
(I can't make any demands, I'm not the maintainer) IMO it makes sense to have a PR taking care of all calls. |
Please use another PR for the other ctime_r() issues. |
Merged as: 75822ef |
In the fuzz test, the value of when variable may be very large(e.g 88123456123456123456),which can not generate a correct time string, may be cause array out-of-bounds access.