Message168860
| Author |
ronaldoussoren |
| Recipients |
ned.deily, ronaldoussoren |
| Date |
2012年08月22日.08:59:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1345625951.66.0.642998232013.issue15761@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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)). |
|
History
|
|---|
| 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 |
|