Mercurial > cpython-lru_cache-weakref
diff Modules/socketmodule.c @ 37629:289116a52bb1 legacy-trunk
Off-by-one buffer overflow error.
| author | Armin Rigo <arigo@tunes.org> |
|---|---|
| date | Wed, 12 Apr 2006 11:59:26 +0000 |
| parents | 3c7ea50518be |
| children | bfc48ad81e80 |
line wrap: on
line diff
--- a/Modules/socketmodule.c Wed Apr 12 10:09:16 2006 +0000 +++ b/Modules/socketmodule.c Wed Apr 12 11:59:26 2006 +0000 @@ -1098,7 +1098,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;
