From 19b6899a393e06d2745fd21ba8aa6bdf6ef9002e Mon Sep 17 00:00:00 2001 From: xfnw Date: Fri, 31 Dec 2021 16:06:33 -0500 Subject: [PATCH] fixed some segmentation faults --- multif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/multif.c b/multif.c index 42ac1f3..1d58b3d 100644 --- a/multif.c +++ b/multif.c @@ -21,8 +21,7 @@ int main(int argc, char *argv[]) size_t len = 0; ssize_t lineSize = 0; - char directory[4096]; - strcpy(directory, strdup(argv[1])); + char *directory = argv[1]; strcat(directory, "/"); //lineSize = getline(&line, &len, stdin);