diff options
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index e18dd32d900..bf8d19fe2f4 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -5972,12 +5972,14 @@ socket_getnameinfo(PyObject *self, PyObject *args) "getnameinfo() argument 1 must be a tuple"); return NULL; } - if (!PyArg_ParseTuple(sa, "si|II", + if (!PyArg_ParseTuple(sa, "si|II;getnameinfo(): illegal sockaddr argument", &hostp, &port, &flowinfo, &scope_id)) + { return NULL; + } if (flowinfo > 0xfffff) { PyErr_SetString(PyExc_OverflowError, - "getsockaddrarg: flowinfo must be 0-1048575."); + "getnameinfo(): flowinfo must be 0-1048575."); return NULL; } PyOS_snprintf(pbuf, sizeof(pbuf), "%d", port); |