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

ebml

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ebml - npm Package Compare versions

Comparing version 0.2.0 to 1.0.0

8

lib/ebml/decoder.js

@@ -118,4 +118,10 @@ var Writable = require('stream').Writable,

tagObj.dataSize = size.value;
tagObj.end += size.value + size.length;
// unknown size
if (size.value === -1) {
tagObj.end = -1;
} else {
tagObj.end += size.value + size.length;
}
debug('read size: ' + size.value);

@@ -122,0 +128,0 @@

6

lib/ebml/tools.js

@@ -20,4 +20,6 @@ var tools = {

if (value >= Math.pow(2, 53 - 8) && buffer[start + 7] > 0) {
throw new Error("Unrepresentable value: " +
buffer.toString('hex', start, start + length));
return {
length: length,
value: -1
};
}

@@ -24,0 +26,0 @@ }

{
"name": "ebml",
"version": "0.2.0",
"version": "1.0.0",
"description": "ebml parser",

@@ -16,9 +16,3 @@ "main": "index.js",

},
"keywords": [
"ebml",
"webm",
"mkv",
"matroska",
"format"
],
"keywords": ["ebml", "webm", "mkv", "matroska", "format"],
"dependencies": {

@@ -39,2 +33,18 @@ "buffers": "^0.1.1",

"author": "Mark Schmale <masch@masch.it>",
"contributors": [{
"name": "Chris Price",
"email": "price.c@gmail.com"
}, {
"name": "Manuel Wiedenmann",
"email": "manuel@funkensturm.de"
}, {
"name": "Ed Markowski",
"email": "siphon@protonmail.com"
}, {
"name": "Davy Van Deursen",
"email": "d.vandeursen@evs.com"
}, {
"name": "Max Ogden",
"email": "max@maxogden.com"
}],
"license": "MIT",

@@ -41,0 +51,0 @@ "bugs": {

@@ -27,6 +27,9 @@ # EBML [![Build Status](https://travis-ci.org/themasch/node-ebml.png?branch=master)](https://travis-ci.org/themasch/node-ebml)

(in alphabetical order)
* [Chris Price](https://github.com/chrisprice)
* [Davy Van Deursen](https://github.com/dvdeurse)
* [Ed Markowski](https://github.com/siphontv)
* [Manuel Wiedenmann](https://github.com/fsmanuel)
* [Mark Schmale](https://github.com/themasch)
* [Max Ogden](https://github.com/maxogden)

@@ -59,11 +59,8 @@ var ebml = require('../lib/ebml/index.js'),

});
it('should throw for more than max representable JS number (2^53 + 1)', function() {
assert.throws(function() {
ebml.tools.readVint(new Buffer([0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]));
}, /Unrepresentable value/);
// an unknown value is represented by -1
it('should return value -1 for more than max representable JS number (2^53 + 1)', function() {
readVint(new Buffer([0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01]), -1);
});
it('should throw for more than max representable JS number (8 byte int max value)', function() {
assert.throws(function() {
ebml.tools.readVint(new Buffer([0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]));
}, /Unrepresentable value/);
it('should return value -1 for more than max representable JS number (8 byte int max value)', function() {
readVint(new Buffer([0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF]), -1);
});

@@ -70,0 +67,0 @@ it('should throw for 9+ byte int values', function() {

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