Message129518
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000018
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Python crashes when dereferencing 0x0000000000000018, which is NULL + 24
This means that it crashes here:
p = asctime(&buf);
if (p[24] == '\n')
p[24] = '\0';
No check is made on asctime(3) return's value, so if it returns NULL, we'll segfault.
I think the problem is that gettmarg doesn't check its returned struct tm.
Also, in time_strtime, there's this comment:
Checks added to make sure strftime() does not crash Python by
414 indexing blindly into some array for a textual representation
415 by some bad index (fixes bug #897625).
416
Is there any good reason why those checks aren't performed directly in
gettmarg ? |
|
Date |
User |
Action |
Args |
2011-02-26 10:02:16 | neologix | set | recipients:
+ neologix, antlong |
2011-02-26 10:02:16 | neologix | set | messageid: <1298714536.78.0.15160141905.issue11327@psf.upfronthosting.co.za> |
2011-02-26 10:02:14 | neologix | link | issue11327 messages |
2011-02-26 10:02:14 | neologix | create | |
|