homepage

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 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:48jazzersetrecipients: + jazzer
2011年10月11日 00:45:48jazzersetmessageid: <1318293948.21.0.819256952944.issue13148@psf.upfronthosting.co.za>
2011年10月11日 00:45:47jazzerlinkissue13148 messages
2011年10月11日 00:45:47jazzercreate

AltStyle によって変換されたページ (->オリジナル) /