From 7f4eaea507b832e39317cb612274bf81526b1f60 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 8 Mar 2006 14:32:16 +0000 Subject: fix --- ChangeLog | 4 ++++ sshfs.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b7362bd..8c203b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-03-08 Miklos Szeredi + + * Fix bug in symlink transformation. Reported by Ralf Hoffmann + 2006-02-24 Miklos Szeredi * Add workaround for broken truncate on old sftp servers. Can be diff --git a/sshfs.c b/sshfs.c index 64f037d..636b856 100644 --- a/sshfs.c +++ b/sshfs.c @@ -1339,7 +1339,7 @@ static void transform_symlink(const char *path, char **linkp) return; dotdots--; - newlink = malloc(dotdots * 3 + l ? strlen(l) : 1 + 10); + newlink = malloc(dotdots * 3 + strlen(l) + 2); if (!newlink) { fprintf(stderr, "sshfs: memory allocation failed\n"); exit(1); -- cgit v1.2.3