[CRIU] [crtools-bot for Pavel Emelyanov ] sockets: Off by one in
fake address preparation
Cyrill Gorcunov
gorcunov at openvz.org
Fri Feb 10 07:06:39 EST 2012
The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit f27c83c70c4a278c393680c9b66203c0f3b1f270
Author: Pavel Emelyanov <xemul at parallels.com>
Date: Fri Feb 10 15:33:21 2012 +0400
sockets: Off by one in fake address preparation
The fake bind name is trimmed on 1 char.
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
sockets.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sockets.c b/sockets.c
index 2c21e5e..67679c5 100644
--- a/sockets.c
+++ b/sockets.c
@@ -668,7 +668,7 @@ static void prep_conn_addr(int id, struct sockaddr_un *addr, int *addrlen)
snprintf(addr->sun_path + 1, UNIX_PATH_MAX - 1, "crtools-sk-%10d", id);
- *addrlen = sizeof(addr->sun_family) + sizeof("crtools-sk-") - 1 + 10;
+ *addrlen = sizeof(addr->sun_family) + sizeof("crtools-sk-") + 10;
}
struct unix_conn_job {
More information about the CRIU
mailing list