From 1c6aa3dd8aa8cd985a63ccbfa3848ebbe52715e1 Mon Sep 17 00:00:00 2001 From: Matt Colyer Date: Wed, 6 Aug 2008 23:47:20 -0700 Subject: Fixed the data corruption, it turns out that there is a maximum length that you can request in an AFC packet 2^16. --- src/ifuse.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ifuse.c') diff --git a/src/ifuse.c b/src/ifuse.c index 7d6f72a..a56289d 100644 --- a/src/ifuse.c +++ b/src/ifuse.c @@ -103,6 +103,9 @@ static int ifuse_read(const char *path, char *buf, size_t size, off_t offset, AFCFile *file; AFClient *afc = fuse_get_context()->private_data; + if (size == 0) + return 0; + file = g_hash_table_lookup(file_handles, &(fi->fh)); if (!file){ return -ENOENT; -- cgit v1.1-32-gdbae