[CRIU] [PATCH] sk-unix: Fix typo in name length estimation

Cyrill Gorcunov gorcunov at openvz.org
Fri Oct 23 07:25:27 PDT 2015


Name with up to UNIX_PATH_MAX in length is
allowed value.

Reported-by: Nikita Spiridonov <nspiridonov at odin.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 sk-unix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sk-unix.c b/sk-unix.c
index c94d0ec8149c..ba22f1cb9605 100644
--- a/sk-unix.c
+++ b/sk-unix.c
@@ -1255,7 +1255,7 @@ static int collect_one_unixsk(void *o, ProtobufCMessage *base)
 	ui->name_dir = (void *)ui->ue->name_dir;
 
 	if (ui->ue->name.len) {
-		if (ui->ue->name.len >= UNIX_PATH_MAX) {
+		if (ui->ue->name.len > UNIX_PATH_MAX) {
 			pr_err("Bad unix name len %d\n", (int)ui->ue->name.len);
 			return -1;
 		}
-- 
2.4.3



More information about the CRIU mailing list