◐ Shell
clean mode source ↗

bpo-33191: Fix refleak in posix_spawn by zware · Pull Request #6315 · python/cpython

PyLong_AsLong() can call arbitrary code. If file_actions is a list, the size of file_actions_obj can be changed after this, and the following PySequence_Fast_GET_ITEM() could read past the end of the list.

I would require file_actions to be a tuple and use PyArg_ParseTuple() for parsing it.