@webassemblyjs/wasm-parser
Advanced tools
+72
-4
@@ -583,6 +583,3 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } | ||
| dump([bodySizeU32.value], "function body size"); | ||
| var code = []; | ||
| /** | ||
| * Parse locals | ||
| */ | ||
| var code = []; // Parse locals | ||
@@ -1294,2 +1291,73 @@ var funcLocalNumU32 = readU32(); | ||
| elems.push(_elemNode); | ||
| } else if (bitfield === 3) { | ||
| var _elemKind2 = readByte(); | ||
| eatBytes(1); | ||
| if (_elemKind2 !== 0) { | ||
| throw new Error("unexpected Elem kind: ".concat(toHex(_elemKind2))); | ||
| } // Parse ( vector function index ) * | ||
| var countU32 = readU32(); | ||
| var count = countU32.value; | ||
| eatBytes(countU32.nextIndex); | ||
| dump([count], "count"); | ||
| for (var _i8 = 0; _i8 < count; _i8++) { | ||
| var _indexu4 = readU32(); | ||
| var _index5 = _indexu4.value; | ||
| eatBytes(_indexu4.nextIndex); | ||
| dump([_index5], "index"); | ||
| } // TODO: emit a AST node, for now just make it parse. | ||
| } else if (bitfield === 4) { | ||
| var expr = []; | ||
| parseInstructionBlock(expr); | ||
| var _countU = readU32(); | ||
| var _count = _countU.value; | ||
| eatBytes(_countU.nextIndex); | ||
| dump([_count], "count"); | ||
| for (var _i9 = 0; _i9 < _count; _i9++) { | ||
| var code = []; | ||
| parseInstructionBlock(code); | ||
| } // TODO: emit a AST node, for now just make it parse. | ||
| } else if (bitfield === 5) { | ||
| var reftype = readByte(); | ||
| eatBytes(1); | ||
| dump([reftype], "reftype"); | ||
| var _countU2 = readU32(); | ||
| var _count2 = _countU2.value; | ||
| eatBytes(_countU2.nextIndex); | ||
| dump([_count2], "count"); | ||
| for (var _i10 = 0; _i10 < _count2; _i10++) { | ||
| var _code = []; | ||
| parseInstructionBlock(_code); | ||
| } // TODO: emit a AST node, for now just make it parse. | ||
| } else if (bitfield === 7) { | ||
| var _reftype = readByte(); | ||
| eatBytes(1); | ||
| dump([_reftype], "reftype"); | ||
| var _countU3 = readU32(); | ||
| var _count3 = _countU3.value; | ||
| eatBytes(_countU3.nextIndex); | ||
| dump([_count3], "count"); | ||
| for (var _i11 = 0; _i11 < _count3; _i11++) { | ||
| var _code2 = []; | ||
| parseInstructionBlock(_code2); | ||
| } // TODO: emit a AST node, for now just make it parse. | ||
| } else { | ||
@@ -1296,0 +1364,0 @@ throw new Error("unexpected Elem with bitfield ".concat(toHex(bitfield))); |
+72
-4
@@ -603,6 +603,3 @@ "use strict"; | ||
| dump([bodySizeU32.value], "function body size"); | ||
| var code = []; | ||
| /** | ||
| * Parse locals | ||
| */ | ||
| var code = []; // Parse locals | ||
@@ -1314,2 +1311,73 @@ var funcLocalNumU32 = readU32(); | ||
| elems.push(_elemNode); | ||
| } else if (bitfield === 3) { | ||
| var _elemKind2 = readByte(); | ||
| eatBytes(1); | ||
| if (_elemKind2 !== 0) { | ||
| throw new Error("unexpected Elem kind: ".concat(toHex(_elemKind2))); | ||
| } // Parse ( vector function index ) * | ||
| var countU32 = readU32(); | ||
| var count = countU32.value; | ||
| eatBytes(countU32.nextIndex); | ||
| dump([count], "count"); | ||
| for (var _i8 = 0; _i8 < count; _i8++) { | ||
| var _indexu4 = readU32(); | ||
| var _index5 = _indexu4.value; | ||
| eatBytes(_indexu4.nextIndex); | ||
| dump([_index5], "index"); | ||
| } // TODO: emit a AST node, for now just make it parse. | ||
| } else if (bitfield === 4) { | ||
| var expr = []; | ||
| parseInstructionBlock(expr); | ||
| var _countU = readU32(); | ||
| var _count = _countU.value; | ||
| eatBytes(_countU.nextIndex); | ||
| dump([_count], "count"); | ||
| for (var _i9 = 0; _i9 < _count; _i9++) { | ||
| var code = []; | ||
| parseInstructionBlock(code); | ||
| } // TODO: emit a AST node, for now just make it parse. | ||
| } else if (bitfield === 5) { | ||
| var reftype = readByte(); | ||
| eatBytes(1); | ||
| dump([reftype], "reftype"); | ||
| var _countU2 = readU32(); | ||
| var _count2 = _countU2.value; | ||
| eatBytes(_countU2.nextIndex); | ||
| dump([_count2], "count"); | ||
| for (var _i10 = 0; _i10 < _count2; _i10++) { | ||
| var _code = []; | ||
| parseInstructionBlock(_code); | ||
| } // TODO: emit a AST node, for now just make it parse. | ||
| } else if (bitfield === 7) { | ||
| var _reftype = readByte(); | ||
| eatBytes(1); | ||
| dump([_reftype], "reftype"); | ||
| var _countU3 = readU32(); | ||
| var _count3 = _countU3.value; | ||
| eatBytes(_countU3.nextIndex); | ||
| dump([_count3], "count"); | ||
| for (var _i11 = 0; _i11 < _count3; _i11++) { | ||
| var _code2 = []; | ||
| parseInstructionBlock(_code2); | ||
| } // TODO: emit a AST node, for now just make it parse. | ||
| } else { | ||
@@ -1316,0 +1384,0 @@ throw new Error("unexpected Elem with bitfield ".concat(toHex(bitfield))); |
+12
-12
| { | ||
| "name": "@webassemblyjs/wasm-parser", | ||
| "version": "1.13.1", | ||
| "version": "1.13.2", | ||
| "keywords": [ | ||
@@ -20,8 +20,8 @@ "webassembly", | ||
| "dependencies": { | ||
| "@webassemblyjs/ast": "1.13.1", | ||
| "@webassemblyjs/helper-api-error": "1.12.1", | ||
| "@webassemblyjs/helper-wasm-bytecode": "1.12.1", | ||
| "@webassemblyjs/ieee754": "1.12.1", | ||
| "@webassemblyjs/leb128": "1.12.1", | ||
| "@webassemblyjs/utf8": "1.12.1" | ||
| "@webassemblyjs/ast": "1.13.2", | ||
| "@webassemblyjs/helper-api-error": "1.13.2", | ||
| "@webassemblyjs/helper-wasm-bytecode": "1.13.2", | ||
| "@webassemblyjs/ieee754": "1.13.2", | ||
| "@webassemblyjs/leb128": "1.13.2", | ||
| "@webassemblyjs/utf8": "1.13.2" | ||
| }, | ||
@@ -36,11 +36,11 @@ "repository": { | ||
| "devDependencies": { | ||
| "@webassemblyjs/helper-buffer": "1.13.1", | ||
| "@webassemblyjs/helper-test-framework": "1.13.1", | ||
| "@webassemblyjs/helper-buffer": "1.13.2", | ||
| "@webassemblyjs/helper-test-framework": "1.13.2", | ||
| "@webassemblyjs/helper-wasm-bytecode": "1.7.7", | ||
| "@webassemblyjs/wasm-gen": "1.13.1", | ||
| "@webassemblyjs/wast-parser": "1.13.1", | ||
| "@webassemblyjs/wasm-gen": "1.13.2", | ||
| "@webassemblyjs/wast-parser": "1.13.2", | ||
| "mamacro": "^0.0.7", | ||
| "wabt": "1.0.12" | ||
| }, | ||
| "gitHead": "cfe35c57093d414839b9350398369b78d97815b4" | ||
| "gitHead": "897aeb784f042a46a00626f1d1cca96159aa5db3" | ||
| } |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
137454
2.95%3549
2.78%6
20%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated