From 79d96d6bffa21ea59f8e084f0b96d354e6097427 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 16 Aug 1996 20:44:34 +0000 Subject: Don't die in resizestring() on filter(, ""). --- Python/bltinmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v0.12