mirror of
https://github.com/python/cpython.git
synced 2024-11-26 03:14:27 +08:00
Don't die in resizestring() on filter(<func>, "").
This commit is contained in:
parent
c13bcca268
commit
79d96d6bff
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user