diff options
| author | paco <paco@voltanet.io> | 2018-06-13 16:33:51 +0200 | 
|---|---|---|
| committer | paco <paco@voltanet.io> | 2018-06-13 16:33:51 +0200 | 
| commit | e1be9119f8dc6d8303d657a2536d4ecaef216f3b (patch) | |
| tree | 2f0791851993ecd59fa9db06269ec8fc912a88f1 /tools/start-stop-daemon.c | |
| parent | b65928513f5f0fcde176dce2c8d8ca2144f82998 (diff) | |
tools: out-of-bounds access (Coverity 1399290)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'tools/start-stop-daemon.c')
| -rw-r--r-- | tools/start-stop-daemon.c | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/start-stop-daemon.c b/tools/start-stop-daemon.c index 6bf55b7740..5f13b90be3 100644 --- a/tools/start-stop-daemon.c +++ b/tools/start-stop-daemon.c @@ -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");  | 
