| Summary: | ctime(*t) can return garbage with large t | ||
|---|---|---|---|
| Product: | uClibc | Reporter: | David Ramos <ramos> |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | ramos, uclibc-cvs |
| Priority: | P5 | ||
| Version: | 0.9.31 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
| Attachments: | Patch containing testcase and proposed fix | ||
|
Description
David Ramos
2010-07-12 07:04:52 UTC
(In reply to comment #0) > The recommended fix is to zero-out the 'tm' struct using memset() before > calling localtime_r. yes. Perhaps you could provide a testsuite entry for this one (test/time/tst-futimens1.c is a good example for a test)? That'd be awesome.. Created attachment 2239 [details]
Patch containing testcase and proposed fix
Applied as 85b7ea33088fa16d319adbd228fc152f5b9da730. Thanks! |