Comparing version 0.4.7 to 0.4.8
@@ -22,5 +22,12 @@ "use strict" | ||
// Ensure buffer is valid size | ||
if(size < 5 || size != buffer.length) throw new Error("corrupt bson message"); | ||
// Ensure buffer is valid size | ||
if(size < 5 || buffer.length < size) { | ||
throw new Error("corrupt bson message"); | ||
} | ||
// Illegal end value | ||
if(buffer[size - 1] != 0) { | ||
throw new Error("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00"); | ||
} | ||
// Start deserializtion | ||
@@ -27,0 +34,0 @@ return deserializeObject(buffer, options, isArray); |
{ "name" : "bson" | ||
, "description" : "A bson parser for node.js and the browser" | ||
, "keywords" : ["mongodb", "bson", "parser"] | ||
, "version" : "0.4.7" | ||
, "version" : "0.4.8" | ||
, "author" : "Christian Amor Kvalheim <christkv@gmail.com>" | ||
@@ -6,0 +6,0 @@ , "contributors" : [] |
@@ -38,3 +38,3 @@ Javascript + C++ BSON parser | ||
var bson = require("bson"); | ||
var BSON = bson.BSONPure.BSON; | ||
var BSON = new bson.BSONPure.BSON(); | ||
var Long = bson.BSONPure.Long; | ||
@@ -41,0 +41,0 @@ |
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
10767
411029
25