Fix copy_string dst validation
[lttng-tools.git] / 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.022686 seconds and 4 git commands to generate.