This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients antlong, neologix
Date 2011-02-26.10:02:14
SpamBayes Score 6.817514e-08
Marked as misclassified No
Message-id <1298714536.78.0.15160141905.issue11327@psf.upfronthosting.co.za>
In-reply-to
Content
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 ?
History
Date User Action Args
2011-02-26 10:02:16neologixsetrecipients: + neologix, antlong
2011-02-26 10:02:16neologixsetmessageid: <1298714536.78.0.15160141905.issue11327@psf.upfronthosting.co.za>
2011-02-26 10:02:14neologixlinkissue11327 messages
2011-02-26 10:02:14neologixcreate