t5500, t5539: tests for shallow depth excluding a ref
[gitweb.git] / test-path-utils.c
index c3adcd87b8caa2028785483bbc01d85fd0f7a9d6..6232dfe661a53d1eaf17ead5133da5792ae2413f 100644 (file)
@@ -56,7 +56,7 @@ static int test_function(struct test_data *data, char *(*func)(char *input),
                if (!data[i].from)
                        to = func(NULL);
                else {
-                       strcpy(buffer, data[i].from);
+                       xsnprintf(buffer, sizeof(buffer), "%s", data[i].from);
                        to = func(buffer);
                }
                if (!strcmp(to, data[i].to))