diff options
author | Guido van Rossum <guido@python.org> | 2000-05-09 14:14:27 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-05-09 14:14:27 +0000 |
commit | b8872e61c622e15c68336fcc776e705f904e1e50 (patch) | |
tree | 215fff0dff7ca3de6a76769f193b3564cdbd5539 /Python/pythonrun.c | |
parent | 2a91cd463ae63ab1e716159d3dac2b8ee923c4c7 (diff) | |
download | cpython-git-b8872e61c622e15c68336fcc776e705f904e1e50.tar.gz |
Trent Mick:
Fix the string methods that implement slice-like semantics with
optional args (count, find, endswith, etc.) to properly handle
indeces outside [INT_MIN, INT_MAX]. Previously the "i" formatter
for PyArg_ParseTuple was used to get the indices. These could overflow.
This patch changes the string methods to use the "O&" formatter with
the slice_index() function from ceval.c which is used to do the same
job for Python code slices (e.g. 'abcabcabc'[0:1000000000L]).
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions