diff --git a/CHANGELOG.md b/CHANGELOG.md index ef93694b3..bc8ccfec4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,7 @@ All notable changes to this project will be documented in this file. - [#2086] AS3 direct editation - not deleting old nested methods when they have multiple usages - [#2009] Missing images in MacOs icon - AS3 Initialization of var in script initializer +- AS3 Nullpointer on getting multiname which is out of bounds ### Changed - [#2070] String values inside SWF to XML export are backslash escaped diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java index 0f525f1e6..2e81b8b6a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -476,8 +476,8 @@ public class ABC implements Openable { for (int ip = 0; ip < body.getCode().code.size(); ip++) { if (body.getCode().code.get(ip).definition instanceof CallPropertyIns) { int mIndex = body.getCode().code.get(ip).operands[0]; - if (mIndex > 0) { - Multiname m = constants.getMultiname(mIndex); + if (mIndex > 0 && mIndex < constants.getMultinameCount()) { + Multiname m = constants.getMultiname(mIndex); if (m.getNameWithNamespace(constants, true).toRawString().equals("flash.utils.getDefinitionByName")) { if (ip > 0) { if (body.getCode().code.get(ip - 1).definition instanceof PushStringIns) {