diff options
author | Armin Rigo <arigo@tunes.org> | 2006-04-12 11:59:26 (GMT) |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2006-04-12 11:59:26 (GMT) |
commit | 2db15505be38a0d8a87919f5864d116e4ae74a54 (patch) | |
tree | 2078cb9a824d1df4e9d7f9ceb5a008130bbc16c0 | |
parent | bc96609555db6f62fa755c047d7db4441dd2ffe1 (diff) | |
download | cpython-2db15505be38a0d8a87919f5864d116e4ae74a54.zip cpython-2db15505be38a0d8a87919f5864d116e4ae74a54.tar.gz cpython-2db15505be38a0d8a87919f5864d116e4ae74a54.tar.bz2 |
Off-by-one buffer overflow error.
-rw-r--r-- | Modules/socketmodule.c | 2 |
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; |