Message145319
| Author |
jazzer |
| Recipients |
jazzer |
| Date |
2011年10月11日.00:45:47 |
| SpamBayes Score |
1.6528455e-07 |
| Marked as misclassified |
No |
| Message-id |
<1318293948.21.0.819256952944.issue13148@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The condition contradicts the exception text:
if (offset >= st.st_size) {
PyErr_SetString(PyExc_ValueError,
"mmap offset is greater than file size");
return NULL;
}
The condition should be changed to (offset > st.st_size), similar to the later condition which is correct:
} else if (offset + (size_t)map_size > st.st_size) {
PyErr_SetString(PyExc_ValueError,
"mmap length is greater than file size");
return NULL;
}
The patch is attached. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年10月11日 00:45:48 | jazzer | set | recipients:
+ jazzer |
| 2011年10月11日 00:45:48 | jazzer | set | messageid: <1318293948.21.0.819256952944.issue13148@psf.upfronthosting.co.za> |
| 2011年10月11日 00:45:47 | jazzer | link | issue13148 messages |
| 2011年10月11日 00:45:47 | jazzer | create |
|