diff options
author | Pino Toscano <toscano.pino@tiscali.it> | 2013-03-23 17:20:42 +0100 |
---|---|---|
committer | Pino Toscano <toscano.pino@tiscali.it> | 2013-03-23 17:20:42 +0100 |
commit | 2aa0eeb9752411ab599f537c7624ac25d6ffaf2c (patch) | |
tree | 21d6eb9f1055ad7f2ee384eb48cc5f076011d048 | |
parent | f71d41bcffa800d41120bb038f358fc946126109 (diff) |
Fix readlink
Instead of passing to the readlink operation a maximum size of INT_MAX,
pass a better size based on the actual stat information.
* src/netfs.c (netfs_attempt_readlink): Fix size arg of FUSE_OP_CALL(readlink).
-rw-r--r-- | src/netfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netfs.c b/src/netfs.c index 0511b0569..16e616b5d 100644 --- a/src/netfs.c +++ b/src/netfs.c @@ -191,7 +191,7 @@ error_t netfs_attempt_readlink (struct iouser *user, struct node *node, goto out; if(FUSE_OP_HAVE(readlink)) - err = -FUSE_OP_CALL(readlink, node->nn->path, buf, INT_MAX); + err = -FUSE_OP_CALL(readlink, node->nn->path, buf, node->nn_stat.st_size + 1); else err = EOPNOTSUPP; |