Bug 4991 - strftime crash on amd64
Summary: strftime crash on amd64
Status: RESOLVED INVALID
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-05 08:48 UTC by Pekka Lampila
Modified: 2014-07-04 15:47 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
An example that crashes on amd64 (219 bytes, text/plain)
2007-09-05 08:50 UTC, Pekka Lampila
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pekka Lampila 2007-09-05 08:48:38 UTC
When using gmtime_r with huge value on amd64 it creates a brokentime with big
tm_mon value. If you then call strftime and use %b the program will crash.

I will attach an example.
Comment 1 Pekka Lampila 2007-09-05 08:50:55 UTC
Created attachment 1983 [details]
An example that crashes on amd64
Comment 2 Pekka Lampila 2007-09-05 08:54:50 UTC
Oh, damn it, I should have checked the return value of gmtime_r
Still, is strftime supposed to crash with big tm_mon value?
Comment 3 Pekka Lampila 2007-09-05 08:56:54 UTC
Nothing to see here, move along