diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index 8436f03eeeb..132670d5480 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -2261,9 +2261,9 @@ PyCurses_GetWin(PyCursesWindowObject *self, PyObject *stream) PyObject *data; size_t datalen; WINDOW *win; + _Py_IDENTIFIER(read); PyCursesInitialised; - _Py_IDENTIFIER(read); strcpy(fn, "/tmp/py.curses.getwin.XXXXXX"); fd = mkstemp(fn); diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index a6f8c5a7089..92000024af3 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1662,9 +1662,10 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args, struct sockaddr_can *addr; PyObject *interfaceName; struct ifreq ifr; - addr = (struct sockaddr_can *)addr_ret; Py_ssize_t len; + addr = (struct sockaddr_can *)addr_ret; + if (!PyArg_ParseTuple(args, "O&", PyUnicode_FSConverter, &interfaceName)) return 0;