From 2db15505be38a0d8a87919f5864d116e4ae74a54 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Wed, 12 Apr 2006 11:59:26 +0000 Subject: [PATCH] Off-by-one buffer overflow error. --- Modules/socketmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index c4b67c1ac75..bb5150fa7a6 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;