X Tutup
Skip to content

Transform object keys causes error  #516

@sanex3339

Description

@sanex3339

Following code throws runtime error:

**Bug №1 **

Input:

var passthrough = (object) => object;
var foo = {foo: 1},	
    bar = passthrough({bar: foo.foo});
console.log(bar.bar);

Output:

var passthrough = _0x15e948 => _0x15e948;
var _0x1193f7 = {};
_0x1193f7['foo'] = 0x1;
var _0x49746f = {};
_0x49746f['bar'] = foo['foo'];
var foo = _0x1193f7, bar = passthrough(_0x49746f);
console['log'](bar['bar']);

After extraction {bar: foo.foo} object is inserted before foo variable declaration

Bug №2
Input:

var passthrough = (object) => object;
function test (foo = {foo: 1}, bar = {bar: foo.foo}) {
    return bar.bar;
}
console.log(test());

With this code, looks like maximum call stack error will appear

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup