diff --git a/lib/nodejs/lib/thrift/framed_transport.js b/lib/nodejs/lib/thrift/framed_transport.js
index 9a50a73..058d230 100644
--- a/lib/nodejs/lib/thrift/framed_transport.js
+++ b/lib/nodejs/lib/thrift/framed_transport.js
@@ -35,30 +35,27 @@
 Object.setPrototypeOf(TFramedTransport.prototype, THeaderTransport.prototype);
 
 TFramedTransport.receiver = function(callback, seqid) {
-  var residual = [];
+  var residual = new Buffer(0);
 
   return function(data) {
-    // push received data to residual
-    for(var i = 0; i < data.length; ++i) {
-      residual.push(data[i])
-    }
+    residual = Buffer.concat([residual, Buffer.from(data)]);
 
     while (residual.length > 0) {
       if (residual.length < 4) {
         // Not enough bytes to continue, save and resume on next packet
         return;
       }
-      // get single package sieze
-      var frameSize = binary.readI32(Buffer.from(residual.slice(0, 4)), 0);
+      // Get single package size
+      var frameSize = binary.readI32(residual, 0);
       // Not enough bytes to continue, save and resume on next packet
       if (residual.length < 4 + frameSize) {
         return;
       }
 
-      // splice first 4 bytes
-      residual.splice(0, 4)
-      // get package data
-      var frame = Buffer.from(residual.splice(0, frameSize));
+      // Get package data
+      var frame = residual.subarray(4, 4 + frameSize);
+      // Remove processed data from residual
+      residual = residual.subarray(4 + frameSize);
       callback(new TFramedTransport(frame), seqid);
     }
   };
diff --git a/lib/nodejs/test/header.test.js b/lib/nodejs/test/header.test.js
index 99bb832..12f1557 100644
--- a/lib/nodejs/test/header.test.js
+++ b/lib/nodejs/test/header.test.js
@@ -100,6 +100,18 @@
     assert.equals(otherHeaders.foo, undefined);
     assert.equals(otherHeaders.otherfoo, "baz");
     assert.end();
+  },
+  "Should handle large messages without crashing": function(assert) {
+    const callback = function() {};
+    const onData = TFramedTransport.receiver(callback);
+
+    const largeChunkSize = 2 * 100 * 1024 * 1024;
+    const largeChunk = Buffer.alloc(largeChunkSize, "A");
+    const sizeBuffer = new Buffer(4);
+    sizeBuffer.writeInt32BE(largeChunkSize + 4, 0);
+    onData(Buffer.concat([sizeBuffer, largeChunk]));
+
+    assert.end();
   }
 };
 
diff --git a/lib/nodejs/test/testAll.sh b/lib/nodejs/test/testAll.sh
index 37b6b43..144832e 100755
--- a/lib/nodejs/test/testAll.sh
+++ b/lib/nodejs/test/testAll.sh
@@ -118,6 +118,7 @@
 # unit tests
 
 node ${DIR}/binary.test.js || TESTOK=1
+node ${DIR}/header.test.js || TESTOK=1
 node ${DIR}/int64.test.js || TESTOK=1
 node ${DIR}/deep-constructor.test.js || TESTOK=1
 
