commit | 2db15505be38a0d8a87919f5864d116e4ae74a54 | [log] [tgz] |
---|---|---|
author | Armin Rigo <arigo@tunes.org> | Wed Apr 12 11:59:26 2006 +0000 |
committer | Armin Rigo <arigo@tunes.org> | Wed Apr 12 11:59:26 2006 +0000 |
tree | 2078cb9a824d1df4e9d7f9ceb5a008130bbc16c0 | |
parent | bc96609555db6f62fa755c047d7db4441dd2ffe1 [diff] [blame] |
Off-by-one buffer overflow error.
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 @@ 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;