diff --git a/lib/buffer.js b/lib/buffer.js index dd6f7a37ab..1a9f7caeb5 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -86,6 +86,12 @@ function Buffer(subject, encoding) { poolOffset, poolOffset + this.length); poolOffset += this.length; + + // Ensure aligned slices + if (poolOffset & 0x7) { + poolOffset |= 0x7; + poolOffset++; + } } else { alloc(this, this.length); }