diff options
author | Raymond Hettinger <python@rcn.com> | 2009-02-02 22:44:06 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-02-02 22:44:06 +0000 |
commit | 24e2872f0d04c0d7c1745f677aef1a335433b556 (patch) | |
tree | d11c883d601cda87a46839fbc6ba321089c6cb61 /Python/bltinmodule.c | |
parent | b2dbd4309aa3d2a8a823d251447b8fd8b4b2d7e3 (diff) | |
download | cpython-git-24e2872f0d04c0d7c1745f677aef1a335433b556.tar.gz |
Issue 1242657: list(obj) can swallow KeyboardInterrupt
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 4e6f901ab3..4d7dec1c3f 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -268,6 +268,8 @@ builtin_filter(PyObject *self, PyObject *args) /* Guess a result list size. */ len = _PyObject_LengthHint(seq, 8); + if (len == -1) + goto Fail_it; /* Get a result list. */ if (PyList_Check(seq) && seq->ob_refcnt == 1) { |