summaryrefslogtreecommitdiffstats
path: root/Modules/signalmodule.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-01-18 05:10:37 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-01-18 05:10:37 (GMT)
commit9f30abd3935704528f784d03f9a630a923c485e9 (patch)
treed425de4df6f4cb121fcd281b9dcd7ef6d67b522b /Modules/signalmodule.c
parentbfc02452a3e49cfaf51a068dc3668c8810a8b8de (diff)
parentc68a4a048cf4e2d520b00546d8a4eef3a2723e8b (diff)
downloadcpython-9f30abd3935704528f784d03f9a630a923c485e9.zip
cpython-9f30abd3935704528f784d03f9a630a923c485e9.tar.gz
cpython-9f30abd3935704528f784d03f9a630a923c485e9.tar.bz2
merge 3.3
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r--Modules/signalmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index d633301..bbaf9a3 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -422,7 +422,7 @@ signal_set_wakeup_fd(PyObject *self, PyObject *args)
return NULL;
}
#endif
- if (fd != -1 && fstat(fd, &buf) != 0) {
+ if (fd != -1 && (!_PyVerify_fd(fd) || fstat(fd, &buf) != 0)) {
PyErr_SetString(PyExc_ValueError, "invalid fd");
return NULL;
}