diff --git a/lib/fs.js b/lib/fs.js index ffa216f35388e0..bcfa8aa6b2b611 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -639,6 +639,9 @@ function read(fd, buffer, offsetOrOptions, length, position, callback) { buffer = Buffer.alloc(16384); } + if (params !== undefined) { + validateObject(params, 'options', { nullable: true }); + } ({ offset = 0, length = buffer.byteLength - offset,