Fix: BSD getprogname null pointer dereference
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Sep 2012 02:50:39 +0000 (22:50 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 26 Sep 2012 02:53:26 +0000 (22:53 -0400)
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/compat.h

index 58d8585c4823eb16c7343d256777d770f6773100..4d4a4368fa8bc7f716953821246007e20061c1b5 100644 (file)
@@ -55,7 +55,8 @@ void lttng_ust_getprocname(char *name)
        bsd_name = getprogname();
        if (!bsd_name)
                name[0] = '\0';
-       memcpy(name, bsd_name, LTTNG_UST_PROCNAME_LEN - 1);
+       else
+               memcpy(name, bsd_name, LTTNG_UST_PROCNAME_LEN - 1);
 }
 
 #endif
This page took 0.0267849999999999 seconds and 4 git commands to generate.