Message168860
There could be an off by one error in the decoding of PYTHONEXECUTABLE, mbstowcs will only add a NUL character when there is room for one and when the environment variable is all ASCII the buffer isn't large enough which means the argument to Py_SetProgramName is not NUL-terminated unless there happens to be a NUL byte just beyond the allocated buffer.
The attached patch ensures that there is room for a NUL character. I don't know if this actually fixes the crash as I've been unable to reproduce the issue (with various values of PYTHONEXECUBLE and with/without malloc checking environment variables (see malloc(3)). |
|
Date |
User |
Action |
Args |
2012-08-22 08:59:11 | ronaldoussoren | set | recipients:
+ ronaldoussoren, ned.deily |
2012-08-22 08:59:11 | ronaldoussoren | set | messageid: <1345625951.66.0.642998232013.issue15761@psf.upfronthosting.co.za> |
2012-08-22 08:59:11 | ronaldoussoren | link | issue15761 messages |
2012-08-22 08:59:10 | ronaldoussoren | create | |
|