Commit c53408d6 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

net: sockets -- Make sure ue->namelen < UNIX_PATH_MAX

UNIX_PATH_MAX is a size of path, so max length
should never be equal to such size.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 2ae99d73
......@@ -496,7 +496,7 @@ static int open_unix_sk(struct unix_sk_entry *ue, int *img_fd)
struct sockaddr_un addr;
int ret;
if (!ue->namelen || ue->namelen > UNIX_PATH_MAX) {
if (!ue->namelen || ue->namelen >= UNIX_PATH_MAX) {
pr_err("Bad unix name len %d\n", ue->namelen);
goto err;
}
......
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