aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--minifind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/minifind.c b/minifind.c
index f483055..487e18c 100644
--- a/minifind.c
+++ b/minifind.c
@@ -57,7 +57,7 @@ char *minifind(char *dir, char *search, struct findNode *list)
while (n--)
{
d = malloc(sizeof(char) * (strlen(dir) \
- + strlen(namelist[n]->d_name)+1));
+ + strlen(namelist[n]->d_name)+2));
sprintf(d, "%s/%s", dir, namelist[n]->d_name);
if (strstr(namelist[n]->d_name, search))
insert_node(list->result, d);