diff --git a/lib/fs.js b/lib/fs.js index 912ca0503d5a25..41b4f75d4c0b47 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -631,6 +631,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,