summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-04-25 14:26:52 +0200
committerYorhel <git@yorhel.nl>2009-04-25 14:26:52 +0200
commit2738177fffa45d8b6d73e9d490fbac89673dc5bf (patch)
treec9583a602096e44797329978ba5c69fb2df1bd3b
parent1f341f8b4c266bb07e1cb61b5acf59c3da0a51ea (diff)
Fixed memory overflow bug in path_real_rec()
-rw-r--r--src/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/path.c b/src/path.c
index 6d07d3d..6ff5412 100644
--- a/src/path.c
+++ b/src/path.c
@@ -130,7 +130,7 @@ char *path_real_rec(char *cur, int *links) {
int i, j, n, tmpl, lnkl = 0;
char **arr, *tmp, *lnk, *ret = NULL;
- tmpl = strlen(cur);
+ tmpl = strlen(cur)+1;
tmp = malloc(tmpl);
/* split path */