summaryrefslogtreecommitdiff
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index e7f3aa9..717979b 100644
--- a/lib.c
+++ b/lib.c
@@ -23,6 +23,7 @@
#include <errno.h>
#include <sys/mman.h>
#include <stddef.h>
+#include <stdlib.h>
#include <string.h>
#include "lib.h"
@@ -150,8 +151,8 @@ make_filepath (char *path, char *filename)
if (filepath == NULL)
return NULL;
- strncpy (filepath, path, length);
- strncat (filepath, filename, strlen (filename));
+ strcpy (filepath, path);
+ strcat (filepath, filename);
return filepath;
}