Closed
Description
In Node 6.3.1, you could do this:
var buff = Buffer.alloc(1);
buff.write('', 1, 0);
console.log(buff);
That is, writing empty strings out of the buffer bounds would not cause a crash. However, with 6.4, that code above causes a crash with this error message:
buffer.js:761
return this.utf8Write(string, offset, length);
Range Error: Offset is out of bounds
This change causes my library to break. I'm wondering if this was an intentional change. If so, just let me know, and I'll patch my library to check for empty strings before writing.