Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 37630:1e12ec49df9b 2.4
Backport of r45303: buffer overflow.
| author | Armin Rigo <arigo@tunes.org> |
|---|---|
| date | Wed, 12 Apr 2006 12:04:10 +0000 |
| parents | 42312e5f11fd |
| children | 9b16e8161df7 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Wed Apr 12 10:02:00 2006 +0000 +++ b/Modules/socketmodule.c Wed Apr 12 12:04:10 2006 +0000 @@ -1083,7 +1083,7 @@ 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;
