diff --git a/lib/buffer.js b/lib/buffer.js index 000c54b3a88..51406b6ed61 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -199,8 +199,8 @@ function Buffer(subject, encoding, offset) { if (!pool || pool.length - pool.used < this.length) allocPool(); this.parent = pool; this.offset = pool.used; - pool.used += this.length; - if (pool.used & 7) pool.used = (pool.used + 8) & ~7; + // Align on 8 byte boundary to avoid alignment issues on ARM. + pool.used = (pool.used + this.length + 7) & ~7; } else { // Zero-length buffer