Commit fbbd1f56 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

sk-unix: Fix typo in name length estimation

Name with up to UNIX_PATH_MAX in length is
allowed value.
Reported-by: 's avatarNikita Spiridonov <nspiridonov@odin.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 67fe0607
...@@ -1255,7 +1255,7 @@ static int collect_one_unixsk(void *o, ProtobufCMessage *base) ...@@ -1255,7 +1255,7 @@ static int collect_one_unixsk(void *o, ProtobufCMessage *base)
ui->name_dir = (void *)ui->ue->name_dir; ui->name_dir = (void *)ui->ue->name_dir;
if (ui->ue->name.len) { 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); pr_err("Bad unix name len %d\n", (int)ui->ue->name.len);
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment