mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 12:37:10 +00:00
tools: out-of-bounds access (Coverity 1399290)
Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
parent
b65928513f
commit
e1be9119f8
@ -258,11 +258,11 @@ static void add_namespace(const char *path)
|
||||
nsname = cur;
|
||||
}
|
||||
|
||||
if (!memcmp(nsdirname, "ipcns/", strlen("ipcns/")))
|
||||
if (!strncmp(nsdirname, "ipcns/", strlen("ipcns/")))
|
||||
nstype = CLONE_NEWIPC;
|
||||
else if (!memcmp(nsdirname, "netns/", strlen("netns/")))
|
||||
else if (!strncmp(nsdirname, "netns/", strlen("netns/")))
|
||||
nstype = CLONE_NEWNET;
|
||||
else if (!memcmp(nsdirname, "utcns/", strlen("utcns/")))
|
||||
else if (!strncmp(nsdirname, "utcns/", strlen("utcns/")))
|
||||
nstype = CLONE_NEWUTS;
|
||||
else
|
||||
badusage("invalid namepspace path");
|
||||
|
Loading…
Reference in New Issue
Block a user