Kaydet (Commit) 79d96d6b authored tarafından Guido van Rossum's avatar Guido van Rossum

Don't die in resizestring() on filter(<func>, "").

üst c13bcca2
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment