diff options
author | Walter Dörwald <walter@livinglogic.de> | 2003-02-04 16:28:00 +0000 |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2003-02-04 16:28:00 +0000 |
commit | 903f1e0c40cd25489cdf8856ccb1bb8932c819f8 (patch) | |
tree | 8cf90251718137f576117a39922165165ab8a5f8 /Python/pythonrun.c | |
parent | 57ba55b77deb297dfada56e3e15cb91697665b06 (diff) | |
download | cpython-git-903f1e0c40cd25489cdf8856ccb1bb8932c819f8.tar.gz |
filterstring() and filterunicode() in Python/bltinmodule.c
blindly assumed that tp_as_sequence->sq_item always returns
a str or unicode object. This might fail with str or unicode
subclasses.
This patch checks whether the object returned from __getitem__
is a str/unicode object and raises a TypeError if not (and
the filter function returned true).
Furthermore the result for __getitem__ can be more than one
character long, so checks for enough memory have to be done.
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions