Message100104
| Author |
Alexander.Belopolsky |
| Recipients |
Alexander.Belopolsky, amaury.forgeotdarc, mark.leander, pythonhacker |
| Date |
2010年02月25日.21:20:35 |
| SpamBayes Score |
4.0965748e-05 |
| Marked as misclassified |
No |
| Message-id |
<1267132837.89.0.656450070644.issue7150@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Given
assert(*m > 0);
assert(*d > 0);
at the end of normalize_y_m_d(), it looks like at lest 1 <=*month and 1 <=*day are redundant.
A closer look also reveals
assert(1 <= *m && *m <= 12);
in the middle of normalize_y_m_d(). This seems to leave only *day <=31 possibly relevant.
I suspect that out of bounds day surviving normalize_y_m_d() is a logical error in that function that needs to be fixed and an assert() added at the end. The proposed patch appears to cure the symptom rather than the actual flaw. |
|