From b8fdac7be975f58362a035cdc9c5687c6c287bba Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Fri, 25 Jan 2013 19:42:52 +0000 Subject: Pull fix for exFAT from original source http://code.google.com/p/exfat/source/detail?r=336 Change-Id: Ie8453770a4dcb31283012550f28483ad88bdc267 --- exfat/libexfat/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exfat/libexfat/io.c') 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, -- cgit v1.2.3