Fixed AS3 Nullpointer on getting multiname which is out of bounds

This commit is contained in:
Jindra Petřík
2023-09-28 18:37:04 +02:00
parent 0f72a605a3
commit a20da0839c
2 changed files with 3 additions and 2 deletions

View File

@@ -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) {