Commit 4de6b6ba authored by Aral Balkan's avatar Aral Balkan
Browse files

Replace Buffer() with safer Buffer.alloc()

parent 308af408
......@@ -109,7 +109,7 @@ export default class LineByLine {
let bytesRead;
const buffers = [];
do {
const readBuffer = new Buffer(this.options.readChunk);
const readBuffer = new Buffer.alloc(this.options.readChunk);
bytesRead = fs.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
totalBytesRead = totalBytesRead + bytesRead;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment