summaryrefslogtreecommitdiffstats
path: root/src/ifuse.c
diff options
context:
space:
mode:
authorGravatar Matt Colyer2008-08-06 23:47:20 -0700
committerGravatar Matt Colyer2008-08-06 23:47:20 -0700
commit1c6aa3dd8aa8cd985a63ccbfa3848ebbe52715e1 (patch)
tree0ddd4df6e0022683d3cbc01d18d1ac7ad9d47ee2 /src/ifuse.c
parentbef655966045af34e1f20a7211f0cab2e7e79001 (diff)
downloadlibimobiledevice-1c6aa3dd8aa8cd985a63ccbfa3848ebbe52715e1.tar.gz
libimobiledevice-1c6aa3dd8aa8cd985a63ccbfa3848ebbe52715e1.tar.bz2
Fixed the data corruption, it turns out that there is a maximum length
that you can request in an AFC packet 2^16.
Diffstat (limited to 'src/ifuse.c')
-rw-r--r--src/ifuse.c3
1 files changed, 3 insertions, 0 deletions
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,
103 AFCFile *file; 103 AFCFile *file;
104 AFClient *afc = fuse_get_context()->private_data; 104 AFClient *afc = fuse_get_context()->private_data;
105 105
106 if (size == 0)
107 return 0;
108
106 file = g_hash_table_lookup(file_handles, &(fi->fh)); 109 file = g_hash_table_lookup(file_handles, &(fi->fh));
107 if (!file){ 110 if (!file){
108 return -ENOENT; 111 return -ENOENT;