Commit 362bb515 authored by Armin Rigo's avatar Armin Rigo

PyDict_GetItem() returns a borrowed reference.

There are probably a number of places that are open to attacks
such as the following one, in bltinmodule.c:min_max().
parent 4c1cb7ea
"""
PyDict_GetItem() returns a borrowed reference.
There are probably a number of places that are open to attacks
such as the following one, in bltinmodule.c:min_max().
"""
class KeyFunc(object):
def __call__(self, n):
del d['key']
return 1
d = {'key': KeyFunc()}
min(range(10), **d)
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