summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/socketmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index c4b67c1..bb5150f 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -1098,7 +1098,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
addr = (struct sockaddr_un*)&(s->sock_addr).un;
if (!PyArg_Parse(args, "t#", &path, &len))
return 0;
- if (len > sizeof addr->sun_path) {
+ if (len >= sizeof addr->sun_path) {
PyErr_SetString(socket_error,
"AF_UNIX path too long");
return 0;