mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-03 10:45:52 +00:00
ABC Explorer - Try to avoid index out of bounds
This commit is contained in:
@@ -254,6 +254,9 @@ public class Multiname {
|
||||
if (index == 0) {
|
||||
return "null";
|
||||
}
|
||||
if (index >= constants.getNamespaceCount()) {
|
||||
return "Unknown(" + index + ")";
|
||||
}
|
||||
int type = constants.getNamespace(index).kind;
|
||||
int name_index = constants.getNamespace(index).name_index;
|
||||
String name = name_index == 0 ? null : constants.getNamespace(index).getName(constants).toRawString();
|
||||
@@ -273,6 +276,9 @@ public class Multiname {
|
||||
if (index == 0) {
|
||||
return "null";
|
||||
}
|
||||
if (index >= constants.getNamespaceSetCount()) {
|
||||
return "Unknown(" + index + ")";
|
||||
}
|
||||
StringBuilder ret = new StringBuilder();
|
||||
ret.append("[");
|
||||
for (int n = 0; n < constants.getNamespaceSet(index).namespaces.length; n++) {
|
||||
|
||||
@@ -74,6 +74,9 @@ public class ScriptInfo {
|
||||
|
||||
for (int j = 0; j < traits.traits.size(); j++) {
|
||||
Trait t = traits.traits.get(j);
|
||||
if (t.name_index >= abc.constants.getMultinameCount()) {
|
||||
continue;
|
||||
}
|
||||
Multiname name = t.getName(abc);
|
||||
int nskind = name.getSimpleNamespaceKind(abc.constants);
|
||||
if ((nskind == Namespace.KIND_PACKAGE_INTERNAL)
|
||||
|
||||
Reference in New Issue
Block a user