darknesswind / NutCracker

fork from DamianXVI's squirrel decompiler
20 stars 9 forks source link

Crash when generating DoWhileStatement #16

Closed Psimage closed 6 years ago

Psimage commented 6 years ago

Here is another sample that causes NutCracker to crash: script.zip Now it's something to do with foreach being inside a loop. At least that is what a quick look in debugger gives. It starts decompiling statements inside a loop and goes outside that loop when processing OP_FOREACH instruction in that sample (foreach loopEndIp ends up being higher that the end of a parent loop). Maybe FOREACH loop decompiling is not up-to-date with the recent changes to loops or determination of a loop block is incorrect in some cases.