Socket
Socket
Sign inDemoInstall

@webassemblyjs/wasm-parser

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/wasm-parser - npm Package Compare versions

Comparing version 1.1.2-y.4 to 1.1.2-y.5

20

lib/decoder.js

@@ -500,2 +500,3 @@ "use strict";

for (var i = 0; i < numberOfFuncs; i++) {
var startLoc = getPosition();
dumpSep("function body " + i); // the u32 size of the function code in bytes

@@ -506,3 +507,3 @@ // Ignore it for now

eatBytes(bodySizeU32.nextIndex);
dump([0x0], "function body size (guess)");
dump([bodySizeU32.value], "function body size");
var code = [];

@@ -536,5 +537,9 @@ /**

parseInstructionBlock(code);
var endLoc = getPosition();
state.elementsInCodeSection.push({
code: code,
locals: locals
locals: locals,
endLoc: endLoc,
startLoc: startLoc,
bodySize: bodySizeU32.value
});

@@ -1263,2 +1268,13 @@ }

funcNode.isExternal = func.isExternal;
} // Add function position in the binary if possible
if (opts.ignoreCodeSection === false) {
var startLoc = decodedElementInCodeSection.startLoc,
endLoc = decodedElementInCodeSection.endLoc,
bodySize = decodedElementInCodeSection.bodySize;
funcNode = t.withLoc(funcNode, endLoc, startLoc);
funcNode.metadata = {
bodySize: bodySize
};
}

@@ -1265,0 +1281,0 @@

12

package.json
{
"name": "@webassemblyjs/wasm-parser",
"version": "1.1.2-y.4",
"version": "1.1.2-y.5",
"keywords": [

@@ -19,7 +19,7 @@ "webassembly",

"dependencies": {
"@webassemblyjs/ast": "1.1.2-y.4",
"@webassemblyjs/helper-leb128": "1.1.2-y.4",
"@webassemblyjs/helper-wasm-bytecode": "1.1.2-y.4",
"@webassemblyjs/wasm-parser": "1.1.2-y.4",
"webassemblyjs": "1.1.2-y.4"
"@webassemblyjs/ast": "1.1.2-y.5",
"@webassemblyjs/helper-leb128": "1.1.2-y.5",
"@webassemblyjs/helper-wasm-bytecode": "1.1.2-y.5",
"@webassemblyjs/wasm-parser": "1.1.2-y.5",
"webassemblyjs": "1.1.2-y.5"
},

@@ -26,0 +26,0 @@ "repository": {

@@ -551,2 +551,4 @@ // @flow

for (let i = 0; i < numberOfFuncs; i++) {
const startLoc = getPosition();
dumpSep("function body " + i);

@@ -559,3 +561,3 @@

dump([0x0], "function body size (guess)");
dump([bodySizeU32.value], "function body size");

@@ -597,5 +599,11 @@ const code: Array<Instruction> = [];

const endLoc = getPosition();
state.elementsInCodeSection.push({
code,
locals
locals,
endLoc,
startLoc,
bodySize: bodySizeU32.value
});

@@ -1434,3 +1442,3 @@ }

const funcNode = t.func(func.id, params, result, body);
let funcNode = t.func(func.id, params, result, body);

@@ -1441,2 +1449,10 @@ if (func.isExternal === true) {

// Add function position in the binary if possible
if (opts.ignoreCodeSection === false) {
const { startLoc, endLoc, bodySize } = decodedElementInCodeSection;
funcNode = t.withLoc(funcNode, endLoc, startLoc);
funcNode.metadata = { bodySize };
}
moduleFields.push(funcNode);

@@ -1443,0 +1459,0 @@ });

@@ -58,2 +58,5 @@ // @flow

type DecodedElementInCodeSection = {
startLoc: Position,
endLoc: Position,
bodySize: number,
code: Array<Instruction>,

@@ -60,0 +63,0 @@ locals: Array<Valtype>

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