From 2738177fffa45d8b6d73e9d490fbac89673dc5bf Mon Sep 17 00:00:00 2001
From: Yorhel <git@yorhel.nl>
Date: Sat, 25 Apr 2009 14:26:52 +0200
Subject: [PATCH] Fixed memory overflow bug in path_real_rec()

---
 src/path.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 */
-- 
GitLab