summaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fs.js b/lib/fs.js
index d4f5ee0909..0b9cf0cc9b 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -508,7 +508,7 @@ ReadFileContext.prototype.read = function() {
} else {
buffer = this.buffer;
offset = this.pos;
- length = this.size - this.pos;
+ length = Math.min(kReadFileBufferLength, this.size - this.pos);
}
var req = new FSReqWrap();