Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

thrift

Package Overview
Dependencies
Maintainers
5
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thrift - npm Package Compare versions

Comparing version 0.20.0 to 0.21.0

19

lib/nodejs/lib/thrift/framed_transport.js

@@ -38,9 +38,6 @@ /*

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)]);

@@ -52,4 +49,4 @@ while (residual.length > 0) {

}
// 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

@@ -60,6 +57,6 @@ if (residual.length < 4 + frameSize) {

// 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);

@@ -66,0 +63,0 @@ }

@@ -9,3 +9,3 @@ {

},
"version": "0.20.0",
"version": "0.21.0",
"author": {

@@ -12,0 +12,0 @@ "name": "Apache Thrift Developers",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc