Comparing version 5.4.14 to 5.4.15
@@ -273,2 +273,5 @@ /* jshint node: true */ | ||
BufferPool.prototype.alloc = function (len) { | ||
if (len < 0) { | ||
throw new Error('negative length'); | ||
} | ||
var maxLen = this._len; | ||
@@ -452,2 +455,4 @@ if (len > maxLen) { | ||
Tap.prototype._invalidate = function () { this.pos = this.buf.length + 1; }; | ||
// Read, skip, write methods. | ||
@@ -527,3 +532,3 @@ // | ||
if (this.pos > buf.length) { | ||
return; | ||
return 0; | ||
} | ||
@@ -550,3 +555,3 @@ return this.buf.readFloatLE(pos); | ||
if (this.pos > buf.length) { | ||
return; | ||
return 0; | ||
} | ||
@@ -592,3 +597,8 @@ return this.buf.readDoubleLE(pos); | ||
Tap.prototype.readBytes = function () { | ||
return this.readFixed(this.readLong()); | ||
var len = this.readLong(); | ||
if (len < 0) { | ||
this._invalidate(); | ||
return; | ||
} | ||
return this.readFixed(len); | ||
}; | ||
@@ -598,2 +608,6 @@ | ||
var len = this.readLong(); | ||
if (len < 0) { | ||
this._invalidate(); | ||
return; | ||
} | ||
this.pos += len; | ||
@@ -613,2 +627,6 @@ }; | ||
var len = this.readLong(); | ||
if (len < 0) { | ||
this._invalidate(); | ||
return ''; | ||
} | ||
var pos = this.pos; | ||
@@ -625,2 +643,6 @@ var buf = this.buf; | ||
var len = this.readLong(); | ||
if (len < 0) { | ||
this._invalidate(); | ||
return ''; | ||
} | ||
var pos = this.pos; | ||
@@ -638,2 +660,6 @@ var buf = this.buf; | ||
var len = this.readLong(); | ||
if (len < 0) { | ||
this._invalidate(); | ||
return; | ||
} | ||
this.pos += len; | ||
@@ -884,2 +910,3 @@ }; | ||
hasDuplicates: hasDuplicates, | ||
BufferPool: BufferPool, | ||
Lcg: Lcg, | ||
@@ -886,0 +913,0 @@ OrderedQueue: OrderedQueue, |
{ | ||
"name": "avsc", | ||
"version": "5.4.14", | ||
"version": "5.4.15", | ||
"description": "Avro for JavaScript", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/mtth/avsc", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
259497
8060