summaryrefslogtreecommitdiffstats
path: root/exfat/libexfat
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-01-28 16:22:05 +0100
committerGerrit Code Review <gerrit@5.9.244.119>2013-01-28 16:22:05 +0100
commitaa9dba396163d46711d5bcddee5105ce487b121e (patch)
treea349f63ee2d7ec2deedb2c29f88dee1403e2dd9b /exfat/libexfat
parentReset progress bar in ORS (diff)
parentPull fix for exFAT from original source (diff)
downloadandroid_bootable_recovery-aa9dba396163d46711d5bcddee5105ce487b121e.tar
android_bootable_recovery-aa9dba396163d46711d5bcddee5105ce487b121e.tar.gz
android_bootable_recovery-aa9dba396163d46711d5bcddee5105ce487b121e.tar.bz2
android_bootable_recovery-aa9dba396163d46711d5bcddee5105ce487b121e.tar.lz
android_bootable_recovery-aa9dba396163d46711d5bcddee5105ce487b121e.tar.xz
android_bootable_recovery-aa9dba396163d46711d5bcddee5105ce487b121e.tar.zst
android_bootable_recovery-aa9dba396163d46711d5bcddee5105ce487b121e.zip
Diffstat (limited to 'exfat/libexfat')
-rw-r--r--exfat/libexfat/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exfat/libexfat/io.c b/exfat/libexfat/io.c
index 65df63a78..1be028cf3 100644
--- a/exfat/libexfat/io.c
+++ b/exfat/libexfat/io.c
@@ -341,7 +341,7 @@ ssize_t exfat_generic_pread(const struct exfat* ef, struct exfat_node* node,
}
if (!ef->ro && !ef->noatime)
exfat_update_atime(node);
- return size - remainder;
+ return MIN(size, node->size - offset) - remainder;
}
ssize_t exfat_generic_pwrite(struct exfat* ef, struct exfat_node* node,