api-impl/android/content/res/AssetManager: fix infinite loop with suspicious self-referencing arsc entries

This commit is contained in:
Mis012
2023-10-09 20:11:36 +02:00
parent bf8f11d123
commit 43306bf174

View File

@@ -212,6 +212,10 @@ public final class AssetManager {
return "";
ResValue resValue = tableBlockSearch(id).pickOne().getResValue();
if (resValue.getValueType() == ValueType.REFERENCE) {
if(id == resValue.getData()) {
System.out.println("getResourceText: self-reference... returing \"\"");
return "";
}
return getResourceText(resValue.getData());
}
return resValue.getDataAsPoolString().get();