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 alex
Recipients alex
Date 2010-04-25.18:05:09
SpamBayes Score 2.52365e-05
Marked as misclassified No
Message-id <>
In Objects/stringlib/fastsearch.h the lines:

                if (!STRINGLIB_BLOOM(mask, s[i-1]))


                if (!STRINGLIB_BLOOM(mask, s[i-1]))

can read beyond the front of the array that is passed to it when the loop enters with i = 0.

I originally noticed this when porting the algorithm to PyPy (which has bounds checking :)), all tests pass if I simple add `if i-1 >= 0` before the conditional.  This doesn't appear to actually cause the algorithm to ever break, but it is unsafe.
Date User Action Args
2010-04-25 18:05:11alexsetrecipients: + alex
2010-04-25 18:05:11alexsetmessageid: <>
2010-04-25 18:05:09alexlinkissue8530 messages
2010-04-25 18:05:09alexcreate