summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/bltinmodule.c')
-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;