]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
Fixes use of uninitialized string
authorThomas Hisch <t.hisch@gmail.com>
Fri, 9 Feb 2007 18:24:47 +0000 (19:24 +0100)
committerStephen Hemminger <shemminger@linux-foundation.org>
Tue, 6 Mar 2007 01:35:06 +0000 (17:35 -0800)
store can be used uninitialized in generic_proc_open
if getenv(env) != NULL

Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
misc/ss.c

index ec272f442798ae2a81d922c2596eb0ee3eef2653..156f672e7c7ffcf59aa34737263001ef6c55bfc1 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -121,7 +121,7 @@ int generic_proc_open(char *env, char *name)
                snprintf(store, sizeof(store)-1, "%s/%s", p, name);
                p = store;
        }
-       return open(store, O_RDONLY);
+       return open(p, O_RDONLY);
 }
 
 int net_tcp_open(void)