summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-16 20:44:34 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-16 20:44:34 (GMT)
commit79d96d6bffa21ea59f8e084f0b96d354e6097427 (patch)
tree58f8acd5e751528d5fb3335e242704fa7fb215a8 /Python
parentc13bcca2689c4bc08429e7a52e22e3d058f3b8ce (diff)
downloadcpython-79d96d6bffa21ea59f8e084f0b96d354e6097427.zip
cpython-79d96d6bffa21ea59f8e084f0b96d354e6097427.tar.gz
cpython-79d96d6bffa21ea59f8e084f0b96d354e6097427.tar.bz2
Don't die in resizestring() on filter(<func>, "").
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index ea3d30d..c337f1c 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1735,7 +1735,7 @@ filterstring(func, strobj)
GETSTRINGVALUE((stringobject *)item)[0];
}
- if (resizestring(&result, j) < 0)
+ if (j < len && resizestring(&result, j) < 0)
return NULL;
return result;