diff options
author | Benjamin Peterson <benjamin@python.org> | 2013-01-18 05:10:24 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2013-01-18 05:10:24 (GMT) |
commit | c68a4a048cf4e2d520b00546d8a4eef3a2723e8b (patch) | |
tree | c2da8094f7a98fa39f2acd34af343b99c2c49861 /Modules/signalmodule.c | |
parent | fc4aa76d59968a60ea91bda4b2c505e1070743ac (diff) | |
download | cpython-c68a4a048cf4e2d520b00546d8a4eef3a2723e8b.zip cpython-c68a4a048cf4e2d520b00546d8a4eef3a2723e8b.tar.gz cpython-c68a4a048cf4e2d520b00546d8a4eef3a2723e8b.tar.bz2 |
check windows fd validity (closes #16992)
Diffstat (limited to 'Modules/signalmodule.c')
-rw-r--r-- | Modules/signalmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c index eb89a03..0aac98b 100644 --- a/Modules/signalmodule.c +++ b/Modules/signalmodule.c @@ -427,7 +427,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; } |