summaryrefslogtreecommitdiffstats
path: root/exfat/libexfat
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-01-25 20:42:52 +0100
committerDees_Troy <dees_troy@teamw.in>2013-01-28 16:13:29 +0100
commitb8fdac7be975f58362a035cdc9c5687c6c287bba (patch)
tree423056ea56ef6d9fe7d78c5ce0409d8190d9518e /exfat/libexfat
parentRemove thread logging from actions.cpp (diff)
downloadandroid_bootable_recovery-b8fdac7be975f58362a035cdc9c5687c6c287bba.tar
android_bootable_recovery-b8fdac7be975f58362a035cdc9c5687c6c287bba.tar.gz
android_bootable_recovery-b8fdac7be975f58362a035cdc9c5687c6c287bba.tar.bz2
android_bootable_recovery-b8fdac7be975f58362a035cdc9c5687c6c287bba.tar.lz
android_bootable_recovery-b8fdac7be975f58362a035cdc9c5687c6c287bba.tar.xz
android_bootable_recovery-b8fdac7be975f58362a035cdc9c5687c6c287bba.tar.zst
android_bootable_recovery-b8fdac7be975f58362a035cdc9c5687c6c287bba.zip
Diffstat (limited to '')
-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,