diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e475115..b9759aa41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ All notable changes to this project will be documented in this file. - AS3 code with exception start/end not matching instruction boundary - AS3 deobfuscator in some cases - #349 AS3 - better handling of declarations +- #735 AS3 - index out of bounds in deobfuscator ### Changed - AS3 test methods separated to classes diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorZeroJumpsNullPushes.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorZeroJumpsNullPushes.java index 4cc535dcf..630fbcf2a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorZeroJumpsNullPushes.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/deobfuscation/AVM2DeobfuscatorZeroJumpsNullPushes.java @@ -83,8 +83,11 @@ public class AVM2DeobfuscatorZeroJumpsNullPushes extends SWFDecompilerAdapter { boolean result = false; Set offsets = code.getImportantOffsets(body, true); - // Deliberately skip over instruction zero - for (int i = 1; i < code.code.size(); i++) { + for (int i = 0; i < code.code.size(); i++) { + if (i == 0) { + // Deliberately skip over instruction zero + continue; + } AVM2Instruction ins1 = code.code.get(i - 1); AVM2Instruction ins2 = code.code.get(i); if (ins2.definition instanceof PopIns