aboutsummaryrefslogtreecommitdiff
path: root/src/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c
index 7f91105..17edbd9 100644
--- a/src/common.c
+++ b/src/common.c
@@ -58,7 +58,7 @@ int makeDir(const char* path)
char pathcpy[PATH_MAX];
char *index;
- strncpy(pathcpy, path, PATH_MAX); // make a mutable copy of the path
+ strncpy(pathcpy, path, PATH_MAX-1); // make a mutable copy of the path
for(index = pathcpy+1; *index; ++index)
{
@@ -126,4 +126,4 @@ int removeDir(const char *path) {
r = rmdir(path);
return r;
-} \ No newline at end of file
+}