Fix copy_string dst validation
authorDavid Goulet <david.goulet@polymtl.ca>
Fri, 12 Aug 2011 21:00:33 +0000 (17:00 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Fri, 12 Aug 2011 21:00:33 +0000 (17:00 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
liblttngctl/lttngctl.c

index 14055ed48451b652b06db40e72e7b1de013e3bff..827de137e550ef33de57de09f0d823079d2fd513 100644 (file)
@@ -47,7 +47,7 @@ static int connected;
  */
 static void copy_string(char *dst, const char *src, size_t len)
 {
-       if (src) {
+       if (src && dst) {
                strncpy(dst, src, len);
                /* Enforce the NULL terminated byte */
                dst[len - 1] = '\0';
This page took 0.0253989999999999 seconds and 4 git commands to generate.