diff options
author | Georg Brandl <georg@python.org> | 2006-08-06 08:23:54 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-08-06 08:23:54 (GMT) |
commit | 7e3ba2a699d6a5660fc7bf239b2090d5b2961b8c (patch) | |
tree | 66fae308335a0c755800dd2a16563b5b2a5e41c3 /Python | |
parent | 534fe18e171a41ac216f3eeb1794af61adf50c5b (diff) | |
download | cpython-7e3ba2a699d6a5660fc7bf239b2090d5b2961b8c.zip cpython-7e3ba2a699d6a5660fc7bf239b2090d5b2961b8c.tar.gz cpython-7e3ba2a699d6a5660fc7bf239b2090d5b2961b8c.tar.bz2 |
Bug #1535165: fixed a segfault in input() and raw_input() when
sys.stdin is closed.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/bltinmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 6fcc05e..58dc7c9 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1725,7 +1725,7 @@ builtin_raw_input(PyObject *self, PyObject *args) if (PyFile_WriteString(" ", fout) != 0) return NULL; } - if (PyFile_Check(fin) && PyFile_Check(fout) + if (PyFile_AsFile(fin) && PyFile_AsFile(fout) && isatty(fileno(PyFile_AsFile(fin))) && isatty(fileno(PyFile_AsFile(fout)))) { PyObject *po; |