Comparing version 5.4.11 to 5.4.12
@@ -202,3 +202,9 @@ /* jshint node: true */ | ||
this._readValue = createReader(this._noDecode, this._wType, this._rType); | ||
try { | ||
this._readValue = createReader(this._noDecode, this._wType, this._rType); | ||
} catch (err) { | ||
this.emit('error', err); | ||
return; | ||
} | ||
this._syncMarker = header.sync; | ||
@@ -296,3 +302,14 @@ this.emit('metadata', this._wType, this._codec, header); | ||
this._remaining--; | ||
this.push(this._readValue(tap)); // The read is guaranteed valid. | ||
var val; | ||
try { | ||
val = this._readValue(tap); | ||
if (!tap.isValid()) { | ||
throw new Error('truncated block'); | ||
} | ||
} catch (err) { | ||
this._remaining = 0; | ||
this.emit('error', err); // Corrupt data. | ||
return; | ||
} | ||
this.push(val); | ||
}; | ||
@@ -299,0 +316,0 @@ |
{ | ||
"name": "avsc", | ||
"version": "5.4.11", | ||
"version": "5.4.12", | ||
"description": "Avro for JavaScript", | ||
@@ -63,3 +63,3 @@ "homepage": "https://github.com/mtth/avsc", | ||
"name": "Matthieu Monsch", | ||
"email": "monsch@alum.mit.edu" | ||
"email": "mtth@apache.org" | ||
}, | ||
@@ -66,0 +66,0 @@ "license": "MIT", |
Sorry, the diff of this file is too big to display
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
258654
8027